Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Entity mapping and plugin

Posted on by 100

Hi All ,

I have following scenario:-

Lets say i have two entity  A  with look up A and entity B with look up B on it.

Entity A form has a subgird of entity B.  When we create entity B record from subgrid , we have a mapping in place which is copies the value of look up A (Entity A) to look up B (Entity B).

Now as per my functionality i am writing my plugin on create of entity B in which i am making the value of look up B to null in some conditions.

Plugin is working fine if we are  creating entity B record  from other than subgrid. But if we are creating entity B record from subgrid , the look up B value is not setting to null. It is setting as per entity mapping

Is there anyway i can make look up B value to null  in my plugin ?

*This post is locked for comments

  • Suggested answer
    Michel Gueli Profile Picture
    Michel Gueli 982 on at
    RE: Entity mapping and plugin

    Is your plugin being executed? When you add the record through the subgrid, the plugin is only executed after you press save. The mapping is something that is being executed when the forms opens.

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Entity mapping and plugin

    Hi Vaibhav,

    Please also share the plugin code to see how you are setting it to null. Also I am assuming that you are creating a new record from subgrid and not associating an existing record?

  • Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: Entity mapping and plugin

    Hi Vaibhav,

    Can you share details about your plugin registration steps and share your code here ?? I think you need to run your plugin on post create.

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!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans