locked
How to refresh the parent form attributes when activites are marked as complete. RRS feed

  • Question

  • Hi

    I want to do the following tasks on the Parent form when user completes the activities (email /phone call) either from the Sub-grid (shown on the parent form under Activities) or open the task and perform “mark as complete”

    1. Update the parent form attributes (on the Header and Body sections) and refresh the form to show the current values to the user.
    2. Show/Hide some buttons on the Ribbon bar

    Currently I am updating the parent record using the Plugin & Workflow (when the task is completed) but CRM takes its own time to update (if a workflow) and user has to continuously refresh the screen (Press F5) to see the new values and the new Ribbon bar buttons which is really annoying , Can you please suggest the best way to do this ?

    MSK

    • Edited by mgsk Wednesday, July 2, 2014 9:47 AM
    Wednesday, July 2, 2014 9:35 AM

All replies

  • Hi,

    I assume you are using CRM 2013 from the references to the new ribbon bar, please correct me if I'm wrong. You can set workflows to run synchronously in the 2013 version.

    Adam

    Thursday, July 3, 2014 1:13 PM
  • Hi,

    Like Adam pointed out, if you're using CRM 2013, you can have your Workflows set as synchronous, so the update happens immediately and there is no need to keep refreshing the page. However, if you're not using CRM 2013, you can either move this logic to a Synchronous Plugin or have this implemented using JavaScript OnSave of the Activity where you can use the REST API of CRM. This is part 1 of your question.

    For Part 2 of your question, you'll need to use JavaScript here to hide/show Ribbon buttons. I recommend using the Ribbon Workbench for this.


    Admin QuikView Solution for CRM 2013

    Friday, July 4, 2014 5:36 AM
  • No, I am using CRM 2011 and using Ribbon Workbench for editing the Ribbon buttons

    Can you explain "have this implemented using JavaScript OnSave of the Activity " with more details

    MSK

    Monday, July 7, 2014 1:49 PM
  • Hi,

    You will need to define a trigger that you can poll from Javascript that determines the workflow complete and then you can refresh the screen and ribbon.

    There is a sample in the SDK that shows how to do this - see http://msdn.microsoft.com/en-us/library/jj659838.aspx

    Hope this helps,

    Scott


    Scott Durow
    Blog www.develop1.net    Follow Me
    Rockstar365
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Tuesday, July 8, 2014 10:05 PM
    Answerer