Hi,
I am trying to update address for few contacts in AX using Batch job.
During this process for few random contacts, AX gets stuck while updating DirPartyTable in the below method (at partyRecord.doUpdate() line)
public static void updatePrimaryAddressLocation(DirPartyRecId _party, LogisticsLocationRecId _location)
{
DirPartyTable partyRecord;
ttsbegin;
select forupdate partyRecord where partyRecord.RecId == _party;
if (partyRecord.PrimaryAddressLocation != _location)
{
partyRecord.PrimaryAddressLocation = _location;
partyRecord.doUpdate();
}
ttscommit;
}
I have also attached the call stack below. Can anyone let me know what is the cause of this issue and how it can be fixed.
This issue occurs for random contacts and most of the contacts gets updated without any issue.
Thank you.