Notifications
Announcements
No record found.
this not working for me
info(strFmt("%1", HcmWorkerBankAccount::find(HcmWorker::find(salestable.WorkerSalesResponsible).RecId).AccountNum)) ;
advance thanks
zeeshan
*This post is locked for comments
because HcmWorkerBankAccount::find( is expecting some other values than what you provided.
if you want to get primary bank of worker use following
HcmWorkerBankAccount::findPrimaryBankAccount
there is no method with the name 'findPrimaryBankAccount'
not sure which version of AXC your are using.
can you mention your application version
AX 2012 R3
you are right. I missed the point, as I just checked on my Box where an ISV solution was installed.
Okay, let talk about your initial post, you are not getting results because method find of HCMWokerBankAccount is asking you RecId of HCMWokerBankAccount, you are providing RecId of Worker. So don't expect an output.
you can write a query to get all/first only record which is related to workerusing where clause as under
HCMWokerBankAccount.Worker == _ProvidedValue
or another option can be if you want to use findByWorkerAccount(method) of HCMWokerBankAccount, which will ask you for Woker and AccountId, because structure allows to save multiple bank accounts for same worker
static void WorkerBankDetails(Args _args)
{
HcmWorkerBankAccount hcmWorkerBankAccount;
select * from hcmWorkerBankAccount
where hcmWorkerBankAccount.Worker== 5637146180;
info(strFmt("%1", hcmWorkerBankAccount.AccountNum ));
info(strFmt("%1", hcmWorkerBankAccount.AccountId ));
info(strFmt("%1", hcmWorkerBankAccount.BankAccountType ));
info(strFmt("%1", hcmWorkerBankAccount.Name ));
}
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 4 Most Valuable Professional
Priya_K 4
MyDynamicsNAV 2