Change display name on Service Operations workspace landing page

Kashif Wasim Sa
Tera Contributor

Hello all,

I am attempting to update the homepage of the Service Operations Workspace to display the preferred name instead of the first name in the banner that currently says Hello <first name of user>. We have a custom field in the sys user table that stores the preferred name. I've tried to make these changes following the steps by navigating to UI Builder -> Service Operations Workspace -> making a copy of the existing landing page -> adjusting the greeting under client scripts -> Initial Transactions.
However it seems that the first name is captured via client script using < api.context.session.user.firstName > that does not retrieve the preferred name because it's not querying the sys user table.

Is there a way we can query user table so it can pick up preferred name.

 

Thank you

16 REPLIES 16

Hi Haseeb,

Thank you for your reply and time on this.

I successfully added details to the record table and anticipated that I could subsequently select the user table to search for custom fields in the client script. Please see screenshot attached and appreciate if you can share screenshots of the client script to navigate to user table. Thank you again.

Hi @Kashif Wasim Sa ,

You may follow below

1. Add client script on success event of data broker

2.  use "api.data.look_up_a_single_record_1.result.name.value" in client script to fetch your custom field(replace name with your field name)

3. Remove existing mapping of client script from Page ready event

Refer screenshots
Screenshot 2024-08-23 at 6.07.30 PM.pngScreenshot 2024-08-23 at 6.07.53 PM.pngScreenshot 2024-08-23 at 6.08.31 PM.png

 

Please accept solution and mark it helpful if it answers your query.

Thanks,
Haseeb Ahmed

Hi @Haseeb-Ahmed  Thank you for the screenshots, I have followed all the steps but wasn`t able to query or look for the custom filed in the script. The expectation was to navigate to the custom filed instead of name : replace "api.data.look_up_a_single_record_1.result.name.value".

I am not sure if it is something to do with the family or versions.

Hi @Kashif Wasim Sa ,

 

Please accept solution and/or mark it helpful if it answers your query.

Thanks,
Haseeb Ahmed

Hi @Haseeb-Ahmed  , I am still not able to query or look for custom field.