Hello Folks,
I am trying to create contact person ID through code.
I did followed this code here from community and replaced ContactPersonEntity of Ax2012 with ContactPersonSyncEntity in D365 and got errors at line of code which I have shared below (please excuse for not using code snippet in the way it is intended to be used).
Please suggest a fix for errors and numseq issue described in below snippet.
ContactPersonSyncEntity contactPersonSyncEntity ; //Get State not found error at below line of code. // Update the postal address information. contactPersonSyncEntity .createOrUpdatePostalAddress(postalAddress); //When I comment above code to continue with execution next error I get stating contact person id should be there from below line of code. // Update the contact information. contactPersonSyncEntity .createOrUpdateContactInfo(contactInfo); //Which is strange because before this line of code there is the code contactPersonSyncEntity .parmContactPersonId('CP64'); //Also will be nice f you can share how to get contatPersonId from contactperson number seqeunce sued at legal entity level
Thanks in advance
Mav
Hi Mav,
Why should this post be deleted? Do you still need help with your addresses state issue?
Admin please delete this thread.
Hello All,
I have resolved all the issues with contactperson ID error however unable to resolve one issue which is state not found and it comes at this line below and you will notice that we are supplying the state as WA.
contactPersonEntity.createOrUpdatePostalAddress(postalAddress);
Hello,
Thanks for your note.
Requirement is to create contact in d365 via x++, for which I had followed the steps shared in community thread, ,link of which I have shared in my initial post.
Issue is that I get errors while using the code shared in the thread, details of which error is faced at what line of code are shared in the code snippet in my 1st post.
Form location is Sales and marketing>Relationships>Contacts.
Thanks
Mav
Hi Mav,
can you please explain your requirement ? In which F&O form are you trying to insert the data..
Hello folks,
Any update on this would be really helpful.
Thanks
Mav
André Arnaud de Cal...
291,969
Super User 2025 Season 1
Martin Dráb
230,842
Most Valuable Professional
nmaenpaa
101,156