Friday, December 24, 2010

Importing an XPO through code

This code helps to import an XPO using X++

static void importXPO(Args _args)
{
SysImportElements sysImportElements = new SysImportElements();
;

sysImportElements.newFile("C:\\Form_KranthiTest.xpo");/// this is your XPO filename
sysImportElements.parmImportAot(true);
sysImportElements.parmImportWithIds(false);///if you don't to import with IDvalues
sysImportElements.import();
}