Work notes translation in flow designer

Brijmohan
Tera Contributor

Hi All,

 

Is there any way to translate work notes in flow designer?

 

Thanks,

Brij

10 REPLIES 10

Ankur Bawiskar
Tera Patron
Tera Patron

@Brijmohan 

are you using any inline script?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar ,

 

I am directly updating the message without script.

 

Thanks,

Brij

@Brijmohan 

then other members have already suggested it's not possible.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Brijmohan,

Work notes by their very nature are meant to be fluid and so are free text by the agent / fulfiller etc. That being said, if you had a specific sentence (like an assignment message) added to your worknotes I'm afraid this won't be translatable in the sense of a different fulfiller seeing a different language of the translation each time they were to view that task type of record (whether it be a case or incident etc). This is because of how Journal fields work - each entry stores the text in the language it was entered in. They are essentially numbered strings that do no evaluation at the point of render, so even if you wrap some text with a Message call it will only ever populate in the language of the user session updates that task type record causing it to be static,

In terms of best practice advice, trying to do this by any form of script or even in the flow's logic is not ideal or advised, as it will lead you down the path of many unnecessary customisations leading to a big increase in unnecessary technical debt. I would strongly suggest you review the use of Dynamic Translation for this use case here,

Many thanks,
kind regards


--------------------------------------------------------------------
Director of Globalization Deployment, Internationalization

GRKN
Tera Expert

Hi! A possible way to go is to use the function "gs.getMessage()". But you have to prepare the message in a flow variable before the step, where the work note is created. Then you can use the translated string from the flow variable as new work note ...

 

Here is an example of my flow - where I create translated Microsoft Teams Messages:

GRKN_1-1724677169400.png

 

"gs.getMessage('[KEY]');" looks up for the related key in the table "sys_ui_messages" resp. in "Application Navigator > System UI > Messages":

GRKN_3-1724677345754.png

 

In my case I insert the variable with the translated string into the right place of the flow action:

GRKN_4-1724677605956.png

 

So depending on the users language setting, a text in the correct localization will be posted:

GRKN_5-1724677788972.png

 

In your case you could use the Flow Action "Add WorkNotes". In field "Message" you have to put the Flow Variable:

GRKN_7-1724678075136.pngT
This will create Work Note entry with translated text from the UI Messages Table. You have to be a little creative with things like this ^^^^ 🙂