locked
CRM 2013 Commandbar execute Custom script after execution of Add/Save button regular steps RRS feed

  • Question

  • in CRM 2013, we can add new button and define actions as we want using the RibbonWorkBench tool. but I want to add some custom post script steps after user click on Add or Save Button. I wants to add those steps after regular execution of Add and Save button.

    What i mean by this is I just want to add post steps to this Add and Save button after its regular steps. Please assist how can we achive this?? I see this buttons have CommandCode attribute with Mscrm.SavePrimary values, and nothing on Command.

    Thanks,

    Nick

    Tuesday, September 16, 2014 3:35 PM

Answers

  • No need to add any button. Just use addonsave function and add your script there:-

    http://msdn.microsoft.com/en-gb/library/gg334720.aspx#BKMK_addOnSave


    Regards Faisal

    • Marked as answer by Nicksoft2011 Monday, September 29, 2014 12:36 PM
    Wednesday, September 17, 2014 10:01 AM
  • This function executes before Save action. I am looking for Post save action. I mean when there is new record, it doesn't have Guid, but when user save for first time , CRM generates Guid for that record and immediately I need to perform some action.

    So any idea about after save script??

    • Marked as answer by Nicksoft2011 Monday, September 29, 2014 12:36 PM
    Wednesday, September 17, 2014 1:43 PM
  • To address this issue normally we use plugin or workflow assembly.

    Regards Faisal


    • Edited by Faisal Fiaz Wednesday, September 17, 2014 3:54 PM
    • Marked as answer by Nicksoft2011 Monday, September 29, 2014 12:36 PM
    Wednesday, September 17, 2014 3:54 PM
  • But i need to execute some client side GUI scripts after Save. 

    i guess there is no way to execute client side scripts using plugins, can you?? i mean How do you execute Javascript from Contact/Account PostEntityUpdate plugins??

    • Marked as answer by Nicksoft2011 Monday, September 29, 2014 12:36 PM
    Wednesday, September 17, 2014 4:07 PM
  • if you could explain what post operation steps you wish to perform, we may have a solution.

    regards,

    Jithesh

    • Marked as answer by Nicksoft2011 Monday, September 29, 2014 12:36 PM
    Wednesday, September 17, 2014 7:45 PM

All replies

  • No need to add any button. Just use addonsave function and add your script there:-

    http://msdn.microsoft.com/en-gb/library/gg334720.aspx#BKMK_addOnSave


    Regards Faisal

    • Marked as answer by Nicksoft2011 Monday, September 29, 2014 12:36 PM
    Wednesday, September 17, 2014 10:01 AM
  • This function executes before Save action. I am looking for Post save action. I mean when there is new record, it doesn't have Guid, but when user save for first time , CRM generates Guid for that record and immediately I need to perform some action.

    So any idea about after save script??

    • Marked as answer by Nicksoft2011 Monday, September 29, 2014 12:36 PM
    Wednesday, September 17, 2014 1:43 PM
  • To address this issue normally we use plugin or workflow assembly.

    Regards Faisal


    • Edited by Faisal Fiaz Wednesday, September 17, 2014 3:54 PM
    • Marked as answer by Nicksoft2011 Monday, September 29, 2014 12:36 PM
    Wednesday, September 17, 2014 3:54 PM
  • But i need to execute some client side GUI scripts after Save. 

    i guess there is no way to execute client side scripts using plugins, can you?? i mean How do you execute Javascript from Contact/Account PostEntityUpdate plugins??

    • Marked as answer by Nicksoft2011 Monday, September 29, 2014 12:36 PM
    Wednesday, September 17, 2014 4:07 PM
  • if you could explain what post operation steps you wish to perform, we may have a solution.

    regards,

    Jithesh

    • Marked as answer by Nicksoft2011 Monday, September 29, 2014 12:36 PM
    Wednesday, September 17, 2014 7:45 PM