Hi All,
I have multiple Steps in a Web Form.
First Step is to create contact.
Next Step is to create another record type.
In First Step of Contact Creation i want to check if contact email is already present in CRM then Skip this Step instead of show duplicate message and move to next step.
Can anyone suggest how to do this?
I tried it using below Jquery but was unable to get method to move to next step.
$(document).ready(function() { $('#NextButton').on('click', function (e) { alert("button was clicked"); var emailAddress = $('#emailaddress1').val(); if(emailAddress === null || emailAddress === ""){ alert("Please provide an email"); } else{ var oDataUrl = "/_odata/contacts?$filter=emailaddress1 eq '" + emailAddress + "'"; var oDataResponse = getODataResponse(oDataUrl); if(oDataResponse != null && oDataResponse[0] != null && oDataResponse[0].emailaddress1){ WebFormControl.MoveToNextStep(); } } }) }); function getODataResponse(oDataUrl) { var response = null; $.ajax({ type: "GET", url: oDataUrl, dataType: "json", async: false }).done(function (json) { response = json.value; }); return response; }
*This post is locked for comments