Hi Nikolaos,
Thanks for you help!
I have found the root cause of the issue. It is not in the XML but in our AXD class code.
I tried to pass the Dirparty Element name / type to AxdEntity_DirPartyTable_DirOrganization to initiate DirPartyOrganization class during the create operation based on this link (community.dynamics.com/.../using-aif-to-import-vendors-error-document-does-not-support-the-axdirpartytable-class). But failed to do from Boomi.
Then I found a blog post to add our custom classes code logic in the service classes (sanartham.blogspot.com/.../item-service-in-ax-2012-this-document.html).
Standard AX AXDCustomer class worked based on DirPartyOrganization element not with DirParty. From Boomi, AX Service only showing DirParty Table and a root element of DirParty related fields. So I have added new switch case for DirParty in AXDCustomer & DirPartyServiceOp classes.
1) AXDCustomer -> prepareForSaveExtended()
This is to link DirParty to Customer, Standard uses DirPerson & DirOrganization. I have added one more if block to get details from DirParty object.
Change 1:
// Handle customer logic
case classnum(AxCustTable) :
axCustTable = _axBcStack.top();
// Save after party id
if(_recordProcessingContext == AxdRecordProcessingContext::AfterChildRecordProcessed)
{
if (classidget(_childRecord) == classnum(AxDirPerson))
{
// Assign the party again
axDirPerson = _childRecord;
axCustTable.parmParty(axDirPerson.parmRecId());
return true;
}
else if (classidget(_childRecord) == classnum(AxDirOrganization))
{
// Assign the party again
axDirOrganization = _childRecord;
axCustTable.parmParty(axDirOrganization.parmRecId());
return true;
}
else if (classidget(_childRecord) == classnum(AxDirPartyTable)) -------------------> added by me
{
// Assign the party again
axDirPartyTable = _childRecord;
axCustTable.parmParty(axDirPartyTable.parmRecId());
return true;
}
}
Change 2:
// Handle party logic
case ClassNum(AxDirPartyTable) : ------> added by me
case classnum(AxDirPerson) :
case classnum(AxDirOrganization) :
case classnum(AxDirPersonName) :
case classnum(AxDirOrganizationName) :
return DirPartyServiceOp::handlePartyOperations(_axBcStack, _dataSourceName,
_recordProcessingContext, _childRecord);
2) DirPartyServiceOp -> processSaveForDirParty()
Here I have duplicated the switch case block
case classNum(AxDirOrganization):
and created new block before default case and passed DirParty element values to DirOrganization object.
case classNum(AxDirPartyTable) :
axDirParty = _axdStack.top();
axDirOrganization = new AxDirOrganization();
axDirOrganization.parmPartyNumber(axDirParty.dirPartyTable().PartyNumber);
axDirOrganization.parmName(axDirParty.dirPartyTable().Name);
// We need to check about the existing party number for one event only
switch (_recordProcessingContext)
{
standard code....
Then done Update Service Documents, Refresh Service and Full CIL to make sure no errors.
After this, I can successfully created Customer and it related details in AX from Boomi.