hello mates ,
i am using crm 2016 and i need to create a button using javascript instead of a field
or without a field doesn't matter
this was my code it doesn't work :( code is here :
function IssueReceiptButton(attribute_name){
if (document.getElementById(attribute_name) != null) {
var
var FieldID = "field" + attribute_name;
var elementID = document.getElementById(attribute_name + "_d");
var div = document.createElement("div");
div.style.width = "20%";
div.style.textAlign = "right";
div.style.display = "inline";
elementID.appendChild(div, elementID);
div.innerHTML = '<button id="' + FieldID + '" type="button" style="margin-left: 4px; width: 50%; " >Add Me</button>';
document.getElementById(attribute_name).style.width = "80%";
document.getElementById(FieldID).onclick = function () {onbuttonclick(); };
var Ir = Xrm.Page.getAttribute("new_issuereceipt");
if(Ir.getValue() == null){
Xrm.Page.getAttribute("new_issuereceipt").setVisible(false);
}
}
}
please need ur support masters
*This post is locked for comments
I have the same question (0)