开发者

Dynamics AX 2009 .NET Business connector

开发者 https://www.devze.com 2023-01-04 19:59 出处:网络
I want to know how to create a new item record usi开发者_如何学Cng a template in Dynamics AX 2009 .NET Business connector. I know how to do this using Dynamics AX 2009. Is there a static method that i

I want to know how to create a new item record usi开发者_如何学Cng a template in Dynamics AX 2009 .NET Business connector. I know how to do this using Dynamics AX 2009. Is there a static method that i can call? I also want to show the new item information to the user before saving it. Is this possible?

Please help

Thanks


Have a look at Casperkamal's blog post Using record templates in code for Dynamics Ax 4.0. As the title explicitly states this works for Axapta 4.0, but I have no reason to believe it does not work in AX 2009.

Excerpt:

sysRecordTemplate = SysRecordTemplate::newCommon(inventTable);
sysRecordTemplate.parmForceCompanyTemplate('Feed'); //Template name as string
sysRecordTemplate.createRecord();

You have to convert this X++ to the Business Connector calls in your target language.


What I would do is create a class inside X++ ( because that is our habitat :-) ) and let that class be the 'controller' for doing what you want to do.

Then just make sure you can call the logic you created by creating a static method that you can call. That way, you can use the business connector and you logic is contained in Ax.

(To show data to users before they insert, you could also provide a method that collects the data and passes it to the business connector. (You could create a data contract-like class for this)

0

精彩评论

暂无评论...
验证码 换一张
取 消