Please wait, loading...

 

PREVENT , STOP SAVE FORM OPERATION USING JAVASCRIPT IN MS CRM 2013 (prevent form from save ms crm)

December 19, 2014
WHEN YOU WANT TO ABORT AN SAVE OPERATION IN MS CRM , WE CAN USE THIS JAVASCRIPT TO STOP SAVE OPERATION IN MS CRM

   context.getEventArgs().preventDefault();

1. FIRST ADD A WEB-RESOURCE PASSING PARAMETER .

function checkbox(context) {

    var innerhtmls = Xrm.Page.ui.tabs.get(“{cab6696b-b74a-47a4-b278-fc07fe780565}” ).sections.get( “Sec_IdProof”).$1l_0.innerHTML;
    var checkedis = innerhtmls.match( /defaultvalue=”1″/g );

    if (checkedis == null) {
        alert( “Please Select An Address Proof && An ID Prooof” );
        
        context.getEventArgs().preventDefault();
    }
}

2. CHECK THE CHECKBOX ( PASS EXECUTION CONTEXT  AS FIRST PARAMETER )

References


SOURCE : JUST2CODE.IN
Subscribe to our YouTube channel : https://www.youtube.com/user/TheRussell2012

https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/04/Microsoftdynamics365.png?fit=640%2C651&ssl=1
Microsoft Dynamics Community Profile

Learn more