Hi guys
I have a problem with the SDK.REST.updateRecord function for javascript.
When you want to make an update, it's something like that:
var account = {};
account.Name = "TestAccount";
SDK.REST.updateRecord(account.Id, account, "Account", function() {}, function() {});
The red marked word is a schema name on the entity account. Is there a way that I can make it more flexible? I mean, can I set a variable where the red marked keyword is?
For example:
//attributeName is a string that can be different each time
var attributeName = GetAttributeName();
var account = {};
account.attributeName = "TestAccount";
SDK.REST.updateRecord(account.Id, account, "Account", function() {}, function() {});
I know, that the code above cannot work, but is there a way it works?
Thanks for your support.
Greets,
Dominik
*This post is locked for comments