Advertisements
Home > USD > Denote an Unsaved record in a Session – USD

Denote an Unsaved record in a Session – USD

We got a requirement to denote an unsaved record with * in a session.

Below is the scenario.

  • User opens an Account record in USD
  • USD opens a new Account Session
  • User clicks ‘Create Task’ link from Agent Script.
  • System should display * on ‘Task’ Tab until it gets Saved.
USD - Unsaved Task

USD – Unsaved Task

It’s very easy to achieve using ‘Scriptlet’.

Add a Scriptlet “SetTaskTitle” and set to the hosted control’s Display name (i.e., [[$Scriptlet.SetTaskTitle]] )

USD - Using Scriptlet To Set Display Name

In the “SetTaskTitle” Scriptlet

  • if Task.Subject == “”
    • Set DisplayName=”Task *”
  • Else
    • Set DisplayName=”Task.Subject”
USD - Scriptlet

USD – Scriptlet

Script Text:

function SetTaskTitle() {
if (“[[task.subject]+]” != “”) {
return “[[task.subject]+]”;
}
else
return “Task *”;
}
SetTaskTitle();

Once the Task gets Saved, Tab name changes to ‘Task.Subject’

USD - Saved Task

USD – Saved Task

🙂

Advertisements
Categories: USD Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: