We have a Javascript snippet where we’re trying to update the same object twice (once to clear some fields and then again to set a field and fire a trigger (that requires the other fields to have been cleared)). Unfortunately, the second update doesn’t happen. The same JS code works in a button in Salesforce, just not in Skuid.
The fields in the first update get changed successfully, but the second update
Is this something related to configuration? Or is it a limitation with Skuid?
Here’s what the code essentially looks like:
var opp = skuid.model.getModel(“Opportunity”).getFirstRow();
var o = new sforce.SObject(“Opportunity”);
o.Id = opp.Id;
o.Field_One__c = null;
o.Field_Two__c = null;
sforce.connection.update([o]); // This one works
var d = new Date();
o.Send_Date__c = d.toJSON();
o.Send_Single__c = true;
sforce.connection.update([o]); // This one doesn’t work
Question
Multiple updates in a single snippet

Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.