Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Answered

How to get description from payrollearningcode table on the form

Posted on by 15

Hi,

I'm getting stuck at description of PayrollEarningCode.Description. Based on below code, I'm getting recid of the table but unable to get description.

earncode = PayrollWorkerPositionEarningCode::findByPosition(hcmPosition.RecId);
select payrollEarningCode where payrollEarningCode.RecId == earncode.RecId;
jmgTmpPayExport.DXCEarnCodeStr = payrollEarningCode.Description;

I tried to find by payrollearning::findByearningcode(earncode.earningcode/recid).description; but it didn't work.

Is there anyone who can assist on it?

Thanks,

  • Verified answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: How to get description from payrollearningcode table on the form

    Did you look at the relations of these tables? I don't have a system at hand so I can't check but I'm pretty sure you should be able to find the information by looking at the relations.

    PayrollWorkerPositionEarningCode.RecId is definetely not related to PayrollEarningCode.RecId. RecId is always unique identifier of a record in a table, it's never pointing to other tables.

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.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans