Skip to main content

Notifications

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

Unable to override postload method in custom entity

(1) ShareShare
ReportReport
Posted on by 5,903
Hi team,
 
I have a model UCL and I have a custom entity UCL_CustomerMaster.
 
I have created a project in UCLFS model and we preferred to work on this model only.
 
As per my requirement, I need to work on UCL_CustomerMaster which is in UCL model.
 
So, I have created an Extension of UCL_CustomerMaster in UCLFS model 
 
Now I open this extension entity (UCL_CustomerMaster_Extension) and click on the method node. I saw all the existing methods are grayed out and also click on right click NOT  able to see the override method.
 
*** So, I NOT able to add POSTLOAD method on extension entity (UCL_CustomerMaster_Extension).
 
when I click on extension entity (UCL_CustomerMaster_Extension) and right click " go to UCL_CustomerMaster" , in method I able to see the override method postload and also all methods are editable. But it is in UCL model.
 
But we need to do customisation on UCLFS model only.
 
Please let me know why in UCLFS model I not able to see override option in method and also why all other methods are grayed out in extension entity UCL_CustomerMaster_Extension.
 
Please let me know what is the recommended solution for this.
Categories:
  • Martin Dráb Profile Picture
    Martin Dráb 230,351 Most Valuable Professional on at
    Unable to override postload method in custom entity
    As André said, you can't add a method to the method's node in a data entity extension. You need to create a class and use CoC to extend the method.
     
    Moved from Integration, Dataverse, and general topics forum.
  • @rp@n Profile Picture
    @rp@n 5,903 on at
    Unable to override postload method in custom entity
    Thanks Andre,
     
    You mean yo say extension class with CoC of postload method. Is it?
     
    Kindly confirm pls 
     
    Thanks!
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,349 Super User 2024 Season 2 on at
    Unable to override postload method in custom entity
    Hi Arpan,
     
    You posted a question in Dynamics 365 general, but when reading the question it looks like you are working on a customization in Dynamics 365 F&O. Can you confirm that, please? Or else what other solution are you using?
     
    If it is indeed F&O, do you have a model reference from UCLFS to UCL? Also, in that case, you can't add a method directly to the extension object, but you would need to create an extension class with the method.

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

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,351 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans