Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

Auto populate the fields upon importing the Id in data entity

(0) ShareShare
ReportReport
Posted on by 10

I'm trying to import an excel file in Data management that has a projId only

after importing the file it should automatically generate/populate the value of projName and ProjNumber in the fixed assets form
so that when I Export the data it will automatically put a value on projName and ProjNumber 

is there a way to do this automation or process ?

  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    Bharani Preetham Pe... 3,587 Super User 2024 Season 1 on at
    RE: Auto populate the fields upon importing the Id in data entity

    Hi, you can achieve that by writing code in insert() or update() at that table. So once import of entity is done, then insert or update will be called.

    But this design doesn't work for values to refresh in real time.

  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: Auto populate the fields upon importing the Id in data entity

    Yes, you need to add select statement to get the ProjId name and Approval number based on the ProjId. ProjName you can get it from ProjTable. You can use either initializeEntityDatasource or mapEntityDataSource or defaultRow method.

    Thanks,

    Girish S.

  • HJNC Profile Picture
    HJNC 10 on at
    RE: Auto populate the fields upon importing the Id in data entity

    Hello Girish

    Here is a sample

    I only import FIXEDASSETNUMBER and PROJID.

    FIXEDASSETNUMBER | PROJID

    -------------------------------------

    1234556                     | TM-0005

    --------------------------------------

    however, when I export NAME and APPROVALNUMBER doesn't have a value

    FIXEDASSETNUMBER | PROJID     | NAME  |  APPROVALNUMBER |

    ------------------------------------------------------------------------

    1234556                     | TM-0005  |             |                                    |

    ------------------------------------------------------------------------

    Wherein the NAME  and APPROVALNUMBER is connected with PROJID so if the system check that if there is a PROJID it should also get the value of NAME  and APPROVALNUMBER according  to  PROJID when inserting it to the datasource  

  • Suggested answer
    Mohit Rampal Profile Picture
    Mohit Rampal 12,554 Super User 2024 Season 1 on at
    RE: Auto populate the fields upon importing the Id in data entity

    Hi, If you want to map projNumber and projName field based on ProjId during data entity import then you can use mapEntityToDataSource data entity method

    msdaxpulse.wordpress.com/.../

  • Suggested answer
    GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: Auto populate the fields upon importing the Id in data entity

    Hi HJNC,

    Which version of Ax is about your question.

    I am assuming it as a D365 FO since you tagges Micrsoft Dynamics Ax (Current version).

    You can make use of the initializeEntityDataSource or defaultRow method.

    Refer to the standard entity HcmWorkerBaseEntity.

    Thanks,

    Girish S.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,160 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,962 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans