- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2023 06:47 AM
I need to store custom group descriptions that certain users can create in different languages. I decided to try to approach from UI Messages using localization, but it's impossible to insert data from Flows or Business Rules, it's like the table is super protected.
Anyone have a clue of how to override this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2023 11:20 PM
I managed to find a way to overcome this obstacle. You can access a protected global table through a flow triggered in a scoped application.
First you create a Script Include in global scope where you perform the record insertion in the desired table (in my case, sys_ui_message).
var PassInfoToMessage = Class.create();
PassInfoToMessage.prototype = {
initialize: function() {
},
passData: function (key, lang, msg){
var gr = new GlideRecord('sys_ui_message');
gr.initialize();
gr.setValue('key', key);
gr.setValue('language', lang);
gr.setValue('message', msg);
gr.insert();
},
type: 'PassInfoToMessage'
};
Then, you create a custom action in Flow designer, stablishing the inputs and with a Scripted step calling this Script Include.
Then it's just a matter of putting the action in your flow and everything should work fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2023 07:01 AM
There is a "create" level ACL that restricts the action to "admin" role
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2023 07:04 AM
But BR and Flows interact with data as the System right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2023 07:54 AM
Flows can run as anyone you specify...so make sure to set it to Run As "system user". And you can also specify a role to run the Flow under.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2023 11:20 PM
I managed to find a way to overcome this obstacle. You can access a protected global table through a flow triggered in a scoped application.
First you create a Script Include in global scope where you perform the record insertion in the desired table (in my case, sys_ui_message).
var PassInfoToMessage = Class.create();
PassInfoToMessage.prototype = {
initialize: function() {
},
passData: function (key, lang, msg){
var gr = new GlideRecord('sys_ui_message');
gr.initialize();
gr.setValue('key', key);
gr.setValue('language', lang);
gr.setValue('message', msg);
gr.insert();
},
type: 'PassInfoToMessage'
};
Then, you create a custom action in Flow designer, stablishing the inputs and with a Scripted step calling this Script Include.
Then it's just a matter of putting the action in your flow and everything should work fine.