how to get setForceUpdate functionality in scopped app

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2017 11:07 AM
How do I recreate this functionality in a scoped app? Not sure why it was removed but I need to trigger other business rules form a ui action without updating the record.
- Labels:
-
Scoped App Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2017 03:51 PM
You could make it a client UI Action that then calls an AJAX script (using GlideAjax) to do the actual work that you want completed. Would that be a valid workaround?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2017 06:17 PM
too much work, I just added a journal input field that is hidden, added text and updated current.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-18-2021 01:09 PM
Please try calling gr.update() twice.
couldn't get it to work by removing the first gr.update in the condition, must have them both.
the record will be updated once (only one time for those two calls)
var gr = new GlideRecord(TABLE_NAME);
gr.get(SYS_ID);
if (gr.isValidRecord()) {
// Call gr.update twice ON PURPOSE.
// It's a workaround for gr.setForceUpdate(true), that can't be called from scoped apps.
gr.update();
gr.update();
}
you can also add something like:
gr.setValue('name', gr.getValue('name')); // set a field from the table to the same value
if it makes it feel less ridiculous... 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2023 10:40 AM - edited ‎02-10-2023 10:55 AM
@Barak Pinchovsk This works. But how? Why? (Not a fan of the "Magic")