Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Will It be possible.

(0) ShareShare
ReportReport
Posted on by 2

Hello All Experts,

I want to write a plugin on post operation to update one field value.

But the initial values in the database will be saved by using JavaScript.

if it is possible how will i be able to achieve this functionality. 

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Will It be possible.

    do you create other custom entity record by REST ?

    plugins are attached to events (like create of a record, update, etc etc)

    they can't be called directly by javascript, the only way by javascript is to call the event that is bound to the plugin

    for example if you a have a plugin triggered on the create of a contact record, then you need to create a contact by JS using the odata or soap endpoint

    example:

    1. create other custom entity record

    2. use result obj GUID update it

    hope it helps.

  • EmployeeOcta Profile Picture
    EmployeeOcta 2 on at
    RE: Will It be possible.

    Hello Experts,

    I have a custom button on a custom entity when it gets gets clciked the other custom entity record is created, and at this moment i want to use plugin .

    i hope you understand the requirement.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Will It be possible.

    Hello, EmployeeOcta.

    you can check the CRM event execution pipeline first,

    JS and Plugin execute different timing

    [MSDN]: https://msdn.microsoft.com/en-us/library/gg327941.aspx

    what timing do your Javascript excute.

    If it's through WebAPI, server can auto catch event and execute plugin,

    it is not, unreasonable update field by plugin or workflow.

    if your server is on-pre , you can use T-SQL procedure or function 

    hope it helps.

  • Suggested answer
    Goutham A Profile Picture
    Goutham A on at
    RE: Will It be possible.

    How are you updating the value in javascript. If it is through Web API, i hope they should be available in post update plugin.

    I heard that web API life cycle is different from plugin/workflow life cycle.Not sure though

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…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 231,307 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans