Hi All,
Want to insert a record in LogisticsElectronicAddress using below job. Record is inserted in table but not showing in form of Employee and in not showing in HcmWorker.email().
Can any one have idea why its not working.
static void changeEmail(Args _args)
{
LogisticsElectronicAddress logisticsElectronicAddress;
LogisticsLocation logisticsLocation;
HcmWorker hcmWorker;
DirPerson dirPerson;
DirPartyTable dirPartyTable;
ttsBegin;
//logisticsElectronicAddress.
logisticsElectronicAddress.selectforUpdate(true);
select hcmWorker
join dirPerson
where dirPerson.RecId == hcmWorker.Person
&& hcmWorker.PersonnelNumber == "3081"
join dirPartyTable
where dirPartyTable.RecId == dirPerson.RecId;
//join logisticsElectronicAddress
//where dirPartyTable.PrimaryContactEmail == logisticsElectronicAddress.RecId ;
{
logisticsElectronicAddress.Description = "Email ID";
logisticsElectronicAddress.locator = "Singh@gmail.com";
logisticsElectronicAddress.Type = LogisticsElectronicAddressMethodType::Email;
logisticsElectronicAddress.IsPrimary = true;
logisticsLocation.Description = "3081";
logisticsLocation.IsPostalAddress = NoYes::Yes;
logisticsElectronicAddress.insert();
}
ttsCommit;
}
Thanks and regards
Siddhant Singh