web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

displaying employee job title on form

(0) ShareShare
ReportReport
Posted on by 1,536

hi expert, i want to display employee job title (designation) on my custom form, the data coming from two different tables, hcmworkerposition details table and premployeementinformation,

i just add both data set on my custom form data set, and set property for join property on form for table HmcworkerPosition toPremploymentInformation, also add control field employee position on form and reference data source hcmworker position table,

but the data is not coming accurate..

please guide me.

Regards.

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    237,817 Most Valuable Professional on at

    Can you please explain the problem? "data is not coming accurate" isn't very specific. Also, what's the relation between those tables? If you mean some standard table, please give us exact names (my version of AX contains neither HcmWorkerPosition nor PrEmployeementInformation table).

  • Suggested answer
    Martin Dráb Profile Picture
    237,817 Most Valuable Professional on at

    If you want a solution for standard AX, use HcmPositionWorkerAssignment table. You can use its description() method, or join it with HcmPositionDetail and get the description from there.

  • munsif Profile Picture
    1,536 on at

    thanks martin for you kind and valuable relay as always,actually the form on which i want to display employee designation as customized table not standard,and having fields

    EMPLOYMENTTYPE EARNINGRULECODE BENDEDRULECODE PAYGROUPCODE ENTITLEMENTRULECODE BASICSALARY EMPLOYEEID DAILYWORKINGHOURS PAYMENTMETHOD CURRENCY STARTDATE ENDDATE SALARYSTATUS DIMENSION EMPLOYEENAME GENERATIONTYPE REFRECID DATAAREAID RECVERSION PARTITION RECID,

    and i want to make relationship of this table to a table (HcmpoistionDetail) or any other which have employee designation ,so how it can.

    Regards.

  • Faqruddin Profile Picture
    1,883 on at

    Dear Rehman - Please call the display method in your custom form and write the code for join the two tables. I'm sharing my sample code and replace the code with your tables..

    display ItemGroupId itemGroupId()

    {

       InventItemGroupItem inventItemGroup;

       select ItemGroupId from inventItemGroup where inventItemGroup.ItemId == this.ItemId

            &&  inventItemGroup.ItemDataAreaId  == this.dataAreaId;

       return inventItemGroup.ItemGroupId;

    }

    Best Regards,

    Faqru Shaik

  • Martin Dráb Profile Picture
    237,817 Most Valuable Professional on at

    Arbitrary field names don't say much. Please tell us about logical relations of your table to other tables.

  • munsif Profile Picture
    1,536 on at

    thankx for so much cooperation  guidance once agian,, table have relationship with HcmWorker through EmpIoyeeid,i.e customTable.Employeeid==Hcmworker.PersonalNumber

  • Suggested answer
    Martin Dráb Profile Picture
    237,817 Most Valuable Professional on at

    One employee can have multiple positions. If you want a single title, you must somehow pick just a single position.

    Either you need some extra information in your table (maybe position ID). you have to choose the positions by some business logic (e.g. to take the primary one or a random one if none is primary).

  • munsif Profile Picture
    1,536 on at

    ok , but if i want to get single primary position for an employee and then want to display his/her desgination, so how it can ,while my custom table have only relation with HcmWorker table,

    Regards Dear Martin.

  • Verified answer
    Martin Dráb Profile Picture
    237,817 Most Valuable Professional on at

    Please define your criteria exactly. For example, if you look for primary positions only, you may get no results, because no one must be set at primary. Unfortunately I can't tell you what your business requirements are.

    Then tell us what problem you have with implementing your requirement. Do you understand how to write queries and use display methods?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Scott_itD Profile Picture

Scott_itD 2 Community Manager

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans