Hi,
I have a piece of JavaScript as below which gets the data from text field when user save the record. I am calling the function through custom HTML button on the Form. My problem is when I enter the data and click outside of the field then if I click Save it is working fine but when I enter some data into the text field and without leaving the field if I click on the Save record(custom button). It is not saving and getting NULL value. Could someone please suggest me how to do it. Many Thanks in Advance.
function createRecord() { var oDescription = Xrm.Page.getAttribute("new_description").getValue(); if (oDescription != null) { var callentity = {}; var activityId; var currentUserId = Xrm.Page.context.getUserId(); var oLeadId = Xrm.Page.getAttribute("new_lead").getValue()[0].id; callentity.Subject = "Call Activity"; callentity.Description = oDescription ; XrmSvcToolkit.createRecord({....Some more functions here... }) }
*This post is locked for comments