Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

Issue on saving when cursor is on the text field

$
0
0

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...

})
}



Viewing all articles
Browse latest Browse all 79901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>