We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

how to get setForceUpdate functionality in scopped app

corbettbrasing1
Mega Guru

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.

6 REPLIES 6

Barak Pinchovsk
ServiceNow Employee

Better yet, you can use GlideQuery, this way:

// GlideRecord's "gr.setForceUpdate(true)" can't be called from scoped apps.
// Use GlideQuery instead.
new global.GlideQuery(TABLE_NAME)
        .forceUpdate()
        .where(FIELD_NAME, VALUE)
        .update();

Confirmed.  This works.