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 :
Microsoft Dynamics CRM (Archived)

throw an alert after plugin execution

(0) ShareShare
ReportReport
Posted on by 185

Hi,

I have a plugin which creates contact on update of customer record. My new requirement is , I need to throw an alert when contact gets created successfully on update of customer. How to achieve this. 

Thanks for your inputs .

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Priyesh Profile Picture
    7,396 User Group Leader on at

    Hi,

    You can try this. This will be feasible only if your plugin is Sync and not Async.

    You can have a separate workflow to show this message. The workflow will fire of a separate flag.

    1. The plugin will set the flag to Yes if it is No and No if it is Yes. Add this functionality to the current entity.

    2. On the change of this flag, show a real-time workflow to just show message saying whatever you want it to display.

    3. You can use Stop Workflow step to show this message.

    Hope this works.

  • Suggested answer
    Pawar Pravin  Profile Picture
    5,237 on at

    Hi ,

    In case of plugin you can't call client side scripting, anyway using custom action you can achieve this.

    1. Create JS function on change of field on customer to call action.

    2. Create action and give input parameters which is required while creating contact

    3. Create custom action and return output parameter which you need to get into JS.

    4. Inside JS check returned value and show alert.

  • Suggested answer
    Pawar Pravin  Profile Picture
    5,237 on at

    Hi ,

    In case of plugin you can't call client side scripting, anyway using custom action you can achieve this.

    1. Create JS function on change of field on customer to call action.

    2. Create action and give input parameters which is required while creating contact

    3. Create custom action and return output parameter which you need to get into JS.

    4. Inside JS check returned value and show alert.

  • Suggested answer
    Kokulan Profile Picture
    18,054 on at

    Hi

    There are are few different options to go about this but I would recommend the following

    When a sync plugin executes, the form refreshes with fields value changes. So you could add flag field to your Customer entity, lets call the flag field - Display Message and by default it will be set to No. Once the plugin created the contact successfully, it will set this flag field value to Yes. Since your plugin is sync, the updated value will be reflected on the form. You could have a javascript function that triggers onload of the form and onchange of this field and checks if this flag field value is YES. if so, it will display the message and reset the flag to No.

    Note : If there are more than one users will be working on the account at the same time, you will have to store the User ID as well to only display the message to the user who triggered the plugin to create the Contact.

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans