Just tried this and it doesn't work:
var seconds = new Date().getTime() / 1000; var type = "CAS"; var ID = type + "-" + seconds;
Xrm.Page.data.entity.attributes.get("new_ID").setValue(ID);
anyone know what I'm doing wrong? Thanks.
Hi Andrea,
Just try
Xrm.Page.getAttribute("new_ID").setValue(ID);
If this post answers your question, please click "Mark As Answer" on the post and "Vote as Helpful" Thank you, DT
you need to lower case the field name
var seconds = new Date().getTime() / 1000; var type = "CAS"; var ID = type + "-" + seconds; Xrm.Page.data.entity.attributes.get("new_id").setValue(ID);
My blog: www.crmanswers.net
Try this,
Xrm.Page.data.entity.attributes.get("new_id").setValue(ID);
If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Thanks and Regards, Yogesh Vijay Mulay