What is the Syntax for Re-querying a model inside JavaScript Snippet?? I want to requery a model inside the Snippet…Can anyone help me on this issue…
Page 1 / 1
Hi Matt, thank you for such a prompt response, can you please help me out with that particular snippet? I am calling a webservice Apex class which creates a new Record, I need to requery that model so that I can pick that newly created Record Id and redirect the user to that record automatically…
Assuming you have a model called MyModel and a condition on that model called ‘IdConditionName’ (which is a filterable default on condition where Id=‘’), you can do something like this:
var $ = skuid.$,<br /> model = skuid.$M('MyModel');<br />//var newRowId = whatever your class returns as the Id of the new row<br />model.setCondition(model.getConditionByName('IdConditionName'),newRowId);<br />$.when(model.updateData()).then(function(){<br /> //Do anything you need to do after the query here.<br />});
Wow, Well Thank you so so much Matt, It worked beautifully. Thank you so much for the snippet. I really appreciate you coming up and helping me out.
Thanks Again!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.