Skip to content

saved

Overview

This is an object that contains information about the "Record" before the update that can be used in the "Server Script". You can read the value of the "Column" using the property.

Limitations

  1. It has meaning under the condition "Pre-update". Under other conditions, even if it can be referenced, it will be equivalent to model.
  2. "Attachment Column" and "Comment Column" cannot be used.
  3. "Column" that do not have "Read Permission" in "Column Access Control" cannot be obtained.
  4. "Column" that do not have "Update Permission" in "Column Access Control" cannot change the display on the screen even if you assign a value to them.
  5. "Column" that do not exist on the screen cannot be obtained. To obtain "Column" that are not on the screen, use the "AlwaysGetColumns object".

Properties

No Property Name type Description
1 IssueId / ResultId long ID Column
2 SiteId long "Site ID Column"
3 Creator int Creator Column
4 CreatedTime DateTime Created Datetime Column
5 Updator int Updater Column
6 UpdatedTime DateTime Update Datetime Column
7 Ver int Version Column
8 Title string Title Column
9 Body string Body Item
10 StartTime DateTime Start Column
11 CompletionTime DateTime Complete Column
12 WorkValue decimal Work Volume Column
13 ProgressRate decimal Progression Rate Column
14 RemainingWorkValue decimal Remaining Work Volume Column
15 Status int Status Column
16 Manager int Manager Column
17 Owner int Owner Column
18 Locked bool Lock Column
19 ClassA~ string Class Column
20 NumA~ decimal Numeric Item
21 DateA~ DateTime Date Column
22 DescriptionA~ string Description Column
23 CheckA~ bool Check Column

Methods

There are no methods.

Usage Examples

Even if it is "Pre-update", model retains the values that have been changed by data sent from the screen or CSV (values that will be retained in the database).
Therefore, in a server script that determines what model.Status is, it is difficult to implement a process that you want to perform only when a certain state is changed.
In the example below, saved is used to determine whether the "Status Column" has changed.

JavaScript(Server Script)
const prevStatus = saved.Status;
const currentStatus = model.Status;
if(prevStatus !== currentStatus) {
  context.Log(`Status just has been changed.`);
}

In the same way, monitoring before and after changes to specific data items can be realized.

Also, if you want to make a similar determination after an update, you may be able to achieve this by storing a shared variable that detects whether there has been a change in "context.UserData".

For processes that are idempotent with respect to status, there is no need to respond in this way.

関連情報