Hello,
I’m trying to do create new row snippet with the use of tutorial:
http://help.skuidify.com/m/components/l/109496-mass-create-records
and I would like to ask you for help. Thank you in advance.
The goal is to select accounts or contact from one skuid table (mass action), select the corresponding campaing (built on custom object) and load the accounts or contacts to the object campaign membership (built on custom object).
The corresponding model are as follow:
a) Accounts;
b) Sales Plan;
c) Sales Plan Membership (with filterable default off field Account);
Actions used are:
a) Mass Action that triggers pop-up showing Sales Plans and Row Action on Sales Plan table that create new row in Sales Plan Membership, populating lookup Sales_Plan__c with {{Sales_Plan_c.Id]]
b) Run Custom Java Snippet in the form of:
var params = arguments[0], $ = skuid.$;
var $ = skuid.$;
var model = params.model,
list = params.list,
selectedItems = params.item ? [params.item] : list.getSelectedItems();
var models = skuid.model.map();
var Account = models.Accounts;
var SalesPlanMembership = models.SalesPlanMembership;
$.each(Account.detail,function(){
var row = SalesPlanMembership.createRow({
additionalConditions: [
{ field: ‘Account__c’, value: this.Id, operator: ‘=’, nameFieldValue: this.Name}]
});
});
Could you please give me a hint?
Best regards.
Question
Create New Row - Custom Snippet
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
