If click on "Add link in email" link, auto populate the opened for user in "To" under compose email
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2025 09:51 AM - edited 03-09-2025 09:53 AM
Hi,
If i click on "Add link in email" link, auto populate the opened for user in "To" under compose email.
I tried to find the "Add link in email" link in cxs_ui_action_config but is am in right place to configure the scenario?
Can anyone please help on this, It will be useful for me.
Thanks in Advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2025 12:57 PM
Hi,
Yes, you’re on the right track looking at the Search Action Configuration (“cxs_ui_action_config”). This “Add link in email” button often lives there for certain Workspace experiences. Here’s a suggested approach:
Locate the Correct Action Record
- In your instance, open Search Action Configuration (or a similar table) and find “Add link in email.”
- Verify that the “Action label” or “Action value” matches the UI label you see in Workspace.
Add or Modify the Action Script
- Often, you’ll see a UI Action Visibility script and possibly a UI Action Script (or “Client Script” for the action).
- In the script that runs when the button is clicked, set the email’s “To” field to the opened_for user.
- For example:
// Example:
var openedFor = current.getValue('opened_for');
// Then call or set the email 'To' field:
// This might involve referencing an 'EmailEditorUtil' script or
// another function that sets the compose form fields.
someEmailFunction.setTo(openedFor);
- The exact API or function depends on how your environment handles composing an email in Workspace.
Check EmailEditorUtil or Other Script Includes
- If your environment uses a Script Include like EmailEditorUtil, you may need to extend its logic to accept the opened_for value and populate the “To” field.
- Confirm that the script is accessible from your scope and is client-callable if you’re referencing it from a client script.
Test in Workspace
- After updating the action script, click “Add link in email” in Workspace to confirm that the “To” field automatically fills with the opened_for user.
- You might need to refresh the Workspace or reload the browser to see changes.
If you still don’t see the action or the email compose field doesn’t populate, double-check:
- You’re editing the correct configuration record (some Workspaces have multiple “Add link in email” actions).
- Your user has the right roles to see the updated script.
- Any script references (e.g., EmailEditorUtil) are valid and accessible in the same scope.
I hope this helps you set up the auto-populate of the “Opened for” user in the email’s “To” field. Let me know if you have any questions!
Best regards,
Itallo Brandão
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2025 01:00 PM
Hello @mania
Yes, you are in the right direction. Add link in email id indeed contextual search results - which allows us to add KB Articles suggested link in email.
In the related list you can find the UI action thats related to it and you can modify it to return the opened for field value.
Next step, which I think you are already on it would be to make the email composer widget accept this value and change the to part, which would be in search configuration.
I hope this answers your queries and also explains the flow overall.
Kindly mark my answer as helpful and accept solution if it helped you in anyway,
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2025 05:18 AM
Hello @mania
Kindly accept solution if it helped you in anyway, so that it can be moved from unsolved bucket to solved 😊.
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY