Update value for SETTINGS object field from trigger?

Posted by ithrees on 03-Aug-2017 04:26

Hi All,

Is it possible to update 'SETTINGS' object fields from a trigger or any scripts? I have a case where I need to update a 'SETTINGS' object field from a trigger. 

Thanks and Regards,
-Ithrees

Posted by ithrees on 03-Aug-2017 06:29

I tried with,

rbv_api.setFieldValue("$SETTINGS", {!#SETTINGS.id}, "setFld", "{!myFld#value}");

and It worked.

Thank you

Ithrees

Posted by Mohammed Siraj on 03-Aug-2017 08:37

Yes Ithrees, this is supported in Rollbase.

Settings is basically a singleton object in Rollbase Tenant and hence, you can directly reference the record from any context ( Other ObjectDef's trigger, any formula field, script component of a page) as  {!#SETTINGS.id}.

You can also reference it and use in server-side API calls. Eg:

rbv_api.setFieldValue("$SETTINGS", {!#SETTINGS.id}, 'UserName', 'John'); // where UserName is a text field in Settings Object Definition

Note: Integration name of Settings Object is '$SETTINGS'.

All Replies

Posted by ithrees on 03-Aug-2017 06:29

I tried with,

rbv_api.setFieldValue("$SETTINGS", {!#SETTINGS.id}, "setFld", "{!myFld#value}");

and It worked.

Thank you

Ithrees

Posted by Mohammed Siraj on 03-Aug-2017 08:37

Yes Ithrees, this is supported in Rollbase.

Settings is basically a singleton object in Rollbase Tenant and hence, you can directly reference the record from any context ( Other ObjectDef's trigger, any formula field, script component of a page) as  {!#SETTINGS.id}.

You can also reference it and use in server-side API calls. Eg:

rbv_api.setFieldValue("$SETTINGS", {!#SETTINGS.id}, 'UserName', 'John'); // where UserName is a text field in Settings Object Definition

Note: Integration name of Settings Object is '$SETTINGS'.

This thread is closed