11 December 2014

Create new legal entity using X++ code in AX 2012

Hi Friends,
Below code snippet will help you to create new legal entities in AX 2012

static void CompanyUpload(Args _args)
{
OMNewLegalEntityViewModel oMNewLegalEntityViewModel = new OMNewLegalEntityViewModel();

oMNewLegalEntityViewModel.parmCompany("997");
oMNewLegalEntityViewModel.parmName("Test7");
oMNewLegalEntityViewModel.parmCountryRegion("IND");
oMNewLegalEntityViewModel.createLegalEntity();

info("Company has been created");
}

Happy Daxing..:-)

2 comments:

  1. This article was very helpful in answering alot of questions about Microsoft Dynamics CRM.Dynamics AX Online Training|Microsoft Dynamics AX Training|Sharepoint Online Training

    ReplyDelete
  2. Hello I am so delighted I located your blog, I really located you by mistake, while I was watching on google for something else, Anyways I am here now and could just like to say thank for a tremendous post and a all round entertaining website. Please do keep up the great work. Legal Entity Identifier Number

    ReplyDelete

Give me the commetns and solutions

How to add the Display method in the form level in D365 F&O

 The below examle is to add the form -Data source level adding display method and assigning to form design control.