// delete a DirParty record in Ax2012
static void DirParty_Delete(Args _args)
{
DirPartyTable dirPartyTable;
DirPerson dirPerson;
Common partyRecord;
DirParty dirPartyClass;
DirPersonRecId personRecId;
;
select firstOnly * from dirPerson where dirPerson.name == "ABCDEFG";
personRecId = DirPerson.RecId;
//This is after the worker has been deleted on the HcmWorkerListPage form on HRM
dirPartyTable = DirPartyTable::findRec(DirPerson::find(personRecId).RecId);if (dirPartyTable)
{
partyRecord = dirPartyTable;
dirPartyClass = new DirParty(partyRecord);
if (DirParty::canDeleteParty(dirPartyClass.getPartyRecId(),true))
{
DirParty::autoDeleteParty(dirPartyTable.RecId);
}
}
}
static void DirParty_Delete(Args _args)
{
DirPartyTable dirPartyTable;
DirPerson dirPerson;
Common partyRecord;
DirParty dirPartyClass;
DirPersonRecId personRecId;
;
select firstOnly * from dirPerson where dirPerson.name == "ABCDEFG";
personRecId = DirPerson.RecId;
//This is after the worker has been deleted on the HcmWorkerListPage form on HRM
dirPartyTable = DirPartyTable::findRec(DirPerson::find(personRecId).RecId);if (dirPartyTable)
{
partyRecord = dirPartyTable;
dirPartyClass = new DirParty(partyRecord);
if (DirParty::canDeleteParty(dirPartyClass.getPartyRecId(),true))
{
DirParty::autoDeleteParty(dirPartyTable.RecId);
}
}
}
No comments:
Post a Comment