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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

how to add code on entity .

(0) ShareShare
ReportReport
Posted on by 1,836
I am working on  the entity name projectEntity having table projectstaging ,what i need to do is when the data is to be exported using entity there the value of project id is there  and it populated and the same value is pass to project contract id , what i need do is code on entity so if there is value in contract id available then it should take the value of contract id  else the value of project id is pass to the contract id .can any one plz guide me on this ,  i have not done this before .
 
thanks ,
Regards
Dinesh
I have the same question (0)
  • Suggested answer
    Layan Jwei Profile Picture
    8,112 Super User 2025 Season 2 on at
    Hi Dinesh,
     
    Maybe create an extension for this method "MapDatasourceToEntity" and put your logic there about the contract and the project. Let us know if it works.
     
    Also please make sure to close your other threads and verify answers.
     
    Thanks,
    Layan Jweihan
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future
  • Martin Dráb Profile Picture
    237,884 Most Valuable Professional on at
  • Dineshkarlekar Profile Picture
    1,836 on at
    hi ,
    thanks for reply ,
    i have made extension and code on post load method of entity my code is below.
    [ExtensionOf(tableStr(ProjectEntity))]
    final class DTProjectEntity_Extension
    {
        public void postLoad()
        {
            next  postLoad();
    
            if(this.ProjectContractID == '')
            {
                this.ProjectContractID = this.ProjectID;
            }
        }
    }
     
     

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 565 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans