I have three tables on a page, different models all on the same sObject.
I need a row action on one table to find any rows on the other tables with the same value for the Id field as the row action context row, and then remove a css class from those rows.
Anyone care to take a stab?
I can find the rows in the model that match, but I’m not sure how to connect them to the item in the tables.
Page 1 / 1
Well,
This could definitely be more elegant, but it works:
var model = arguments[0].model,<br> row = arguments[0].row,<br> id = model.getFieldValue(row,'Id'),<br>$ = skuid.$;<br>var primaryCases = skuid.$M('PrimaryCases'),<br> mergeCases = skuid.$M('MergeCases'),<br> primaryItems = primaryCases.registeredItems,<br> mergeItems = mergeCases.registeredItems;<br> <br>$.each(primaryItems, function(){<br> if (id == this.row.Id) {<br> this.element.removeClass('primary-record merge-record');<br> }<br>});<br>$.each(mergeItems, function(){<br> if (id == this.row.Id) {<br> this.element.removeClass('primary-record merge-record');<br> }<br>});
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.