views:

200

answers:

1

HI,

I want to know how to create a new item record using 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

A: 

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.

Jan B. Kjeldsen