I get this error when trying to set a customer's primary address:
(DirOrganization). The record was never selected.
Debugging, I find that the error is thrown by standard AX 2012 code:
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(); // ==> THIS LINE THROWS THE ERROR, altough the record exists in DirPartyTable
}
ttscommit;
}
This is the call stack:
[s] \Data Dictionary\Maps\LogisticsEntityLocationMap\Methods\updatePrimaryLocation 48
[s] \Data Dictionary\Tables\DirPartyLocation\Methods\updatePrimaryLocation 3
[s] \Data Dictionary\Tables\DirPartyLocation\Methods\Update 6
[s] \Classes\xRecord\write
[s] \Data Dictionary\Maps\LogisticsEntityLocationMap\Methods\addEntityLocation 39
[s] \Data Dictionary\Tables\DirPartyLocation\Methods\addEntityLocation 4
[c] \Classes\LogisticsEntityLocationFormHandler\write 28
[c] \Classes\LogisticsEntityPostalAddressFormHandler\write 13
[c] \Classes\DirPartyPostalAddressFormHandler\write 5
[c] \Forms\LogisticsPostalAddress\Data Sources\LogisticsPostalAddress\Methods\written 10
[c] \Classes\FormDataSource\leaveRecord
*This post is locked for comments
I have the same question (0)

Report
All responses (
Answers (