Skip to main content

Notifications

Dynamics 365 general forum

Suggest me the way to approach the Scenario (Preferable Plugin)

Posted on by 5

There is Account entity it is parent and contact entity it is a child while creating child record have to check all child records (need to check only child records under parent record) If child record Business phone number is already there then throw an error, else allow to create a child record

  • Raja Sekhar  Profile Picture
    Raja Sekhar 5 on at
    RE: Suggest me the way to approach the Scenario (Preferable Plugin)

    Hi Ravi

    its working now i unregister the plugin and tried with register again its working thanks for supporting ravi

  • Verified answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Suggest me the way to approach the Scenario (Preferable Plugin)

    Hi,

    Saving you mean update of record? If yes then this plugin may not work. For update, you need to register the plugib on update / pre operation and also change the logic slightly to retrieve the data from plugin images..

    This is because when the plugin updates,  you only get the changed values in the target i.e. if you just change phone number, in plugin only phone number will be available in the target property bag.

    You  eed to use the pligin images in pder to get the already stored data. You need to check the data in plugin images and target property.

    Hope this helps.

  • Raja Sekhar  Profile Picture
    Raja Sekhar 5 on at
    RE: Suggest me the way to approach the Scenario (Preferable Plugin)

    yes goutam and i had checked the plugn by addng exception in first line plugin is not getting fire whilw creating contact record

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Suggest me the way to approach the Scenario (Preferable Plugin)

    Hi Sekhar ,

    Could you please confirm you registered the plugin in pre-operation and the plugin is synchronous .

  • Dynamics365 Rocker Profile Picture
    Dynamics365 Rocker 7,755 on at
    RE: Suggest me the way to approach the Scenario (Preferable Plugin)

    Then throw exception at beginning of your code to know that plugin is getting fire or not.

  • Raja Sekhar  Profile Picture
    Raja Sekhar 5 on at
    RE: Suggest me the way to approach the Scenario (Preferable Plugin)

    Problem is that am not getting any error in the contact form its allowing record to save

    am saying code is working fine and while debugging the code its throwing error if already record exists with the same phone number

  • Dynamics365 Rocker Profile Picture
    Dynamics365 Rocker 7,755 on at
    RE: Suggest me the way to approach the Scenario (Preferable Plugin)

    What error are you getting?

  • Raja Sekhar  Profile Picture
    Raja Sekhar 5 on at
    RE: Suggest me the way to approach the Scenario (Preferable Plugin)

    I know but its not throwing error in form, but code is working while debugging its throwing error  

  • Suggested answer
    Dynamics365 Rocker Profile Picture
    Dynamics365 Rocker 7,755 on at
    RE: Suggest me the way to approach the Scenario (Preferable Plugin)

    If there is "parent account" field has value in newly created contact and any other sub contact of that account has same number then it throw error on contact form as well.

  • Raja Sekhar  Profile Picture
    Raja Sekhar 5 on at
    RE: Suggest me the way to approach the Scenario (Preferable Plugin)

    Hi Goutam

    Code is working fine i twice checked with debugging its working more than one record with same phone number its throwing error.

    But Problem is that in contact form its not throwing any error while saving

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans