I am trying to apply the user selection in one table and then via a snippet on a mass update action, set the condition on a different model and then load/query that model. So the result of the snippet combines the ID into one variable like : ‘a05A000000Eibd5IAB’,‘a05A000000EibFGIAB’,‘a05A000000EibdPOAB’
I then set a condition on this other model to this variable (also this condition is related to a reference field that is looking for “in”). This has not worked because the way tha I am creaating and passing this variable results in skuid seeing this as text versus references. i am not sure it it is parsing this as three ID versus one long text.
Below is my snippet showing capturing these ID, setting the variable and setting the condition. Is there a way to successfully pass these as multiple ID to the condition or is there a better way to acheive quering this model with the right input of the selected ID?
Overall Snippet “Status”:
Cycle Through table and get ID for rows that user has selected - This works
Passing these IDs to a condition (type = reference, in) - This does not work
var params = arguments[0], $ = skuid.$;
var NoteUpdateModel = skuid.model.getModel(‘EditNoteInformantion’);
var ReleaseDetailModel = skuid.model.getModel(‘OrderReleaseDetails’);
var ReleaseDetailRow = ReleaseDetailModel.getRows();
var NewNote = “notes”;
var NoteCondition = NoteUpdateModel.getConditionByName(‘Id’);
NoteId = “”;
AddComma = “”;
n = arguments[0].rows.length;
for(i=n;i>0;i–){
thisRow = ReleaseDetailModel.getRowById(arguments[0].rows[i-1].Id);
NoteId = NoteId + AddComma + “'” + ReleaseDetailModel.getFieldValue(thisRow, ‘Fiber_Planner_Execution_Details__c’, true) + “'”;
alert("id = " +NoteId);
AddComma = “,”;
}
NoteUpdateModel.setCondition(NoteCondition, NoteId, false);
NoteUpdateModel.activateCondition(NoteCondition);
Question
How can I pass the selected records in a table to another model to query other information
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.