Getting value from model that is not refered in your custome model in d365 fo x++
Declare field and add function fieldName2Id and add Table and write field name "Salesman"
FieldId Salesman = fieldName2Id(tableNum(LedgerJournalTrans),"Salesman");
if(Salesman)
{
Tmptable.EmployeeNumber = ledgerJournalTrans.(Salesman);
Tmptable.EmployeeName = HcmWorker::findByPersonnelNumber(Tmptable.EmployeeNumber).name();
}
Comments
Post a Comment