row action to run snippet on current row only
HI,
I wonder if anyone could help me with that.
I have this snippet that i want to use as Row Action to clear a Date field's value
But not really sure how to get it to work on current row from which i clicked the action
This work well for 1st record of a table or on a detail page. But not on any row after the first one
I Understand it's because of 'model.getFirstRow()' but looking at the model api documentation, I could not find what I should use instead
I wonder if anyone could help me with that.
I have this snippet that i want to use as Row Action to clear a Date field's value
But not really sure how to get it to work on current row from which i clicked the action
This work well for 1st record of a table or on a detail page. But not on any row after the first one
I Understand it's because of 'model.getFirstRow()' but looking at the model api documentation, I could not find what I should use instead
var $ = skuid.$, model = skuid.model.getModel('AccountTab'),Thank you
row = model.getFirstRow();
model.updateRow(row, {Favorite_date__c:''});
Tagged:
2
Categories
- 7.9K Questions
- 926 Ideas
- 220 Discussion Categories
- 178 General
- 9 Community Feedback
- 3 Community Info
- 18 Knowledge Base
Comments
//This variable selects the rows Id field. var contactId = params.item.row.Id;
Technically with this then you could set your variable to a value in the row and then run the updateRow method on it. Thanks, Jeff RutterIf you're running the snippet as a row action, your snippet should get passed the 'row' as one of the arguments.
You can use something like this:
Just add a console.log(arguments); at the beginning of your snippet, then run it and take a look at your console to see what arguments are available.
As per Matt's last post , That Worked perfectly!