I use crm 2016 on-premmis. I want to create a record by clicking the custom button using javascript. I create button using ribbon workbench. In the solution, i add jquery-1.9.1.js as a webresources. I write simple code, just to try if the custom button is work or not.
function createAccount() {
var account = {};
account.Name = "Tes 001";
account.Description = "Create Account Test";
//Create the Account
SDK.JQuery.createRecord(
account,
"account",
function (account) {
writeMessage("The account named \"" + account.Name + "\" was created with the AccountId : \"" + account.AccountId + "\".");
writeMessage("Retrieving account with the AccountId: \"" + account.AccountId + "\".");
retrieveAccount(account.AccountId)
},
errorHandler
);
}
I call this function from custom button, but it seem doesn't work. Nothing happen when i click the custom button. Did i'm missing the requirements that make the function dont work ?
*This post is locked for comments
I have the same question (0)