Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Javascript to determine if a user Cancels Saving a record

  • 1.  Javascript to determine if a user Cancels Saving a record

    SILVER CONTRIBUTOR
    Posted Jun 17, 2020 02:02 PM
    Hello All~

    I am trying to not require a field if a field is blank on Deactivate but I would like to keep the field Required if they Cancel the Deactivation. I can easily remove the requirement when the Deactivate button is pressed but how can I get a callback from when the user clicks Cancel to reset the requirement?

    Any suggestions is greatly appreciated.

    Thank you

    ------------------------------
    Chrys Wilkinson
    CRM Analyst
    VA
    ------------------------------
    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 2.  RE: Javascript to determine if a user Cancels Saving a record

    TOP CONTRIBUTOR
    Posted Jul 31, 2020 10:45 PM

    Have you tried checking the status during the formOnLoad event? 

    I am not sure, but I think the screen refreshes when you click cancel.



    ------------------------------
    Rex Kenley Tan, MCSA, MCSD
    Minneapolis MN
    https://www.youracclaim.com/users/rex-kenley-tan

    *Always be CURRENT with JavaScript & C#, NEVER be obsolete.

    DISCLAIMER: All views expressed on this site are my own and DO NOT represent the opinions of ANY entity whatsoever with which I have been, am now, or will be affiliated.
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


If you've found this thread useful, dive deeper into User Group community content by role