Login    Sites MenuBlueStep

BlueStep Platform Support

RelateScript
Outline full outline 
Overview 
Data Types 
Operators 
Statements 
Functions 
Working with Relate Data 
Field Data 
Accessing Forms and Fields 
Special Data and Functions 
System Data 
getDocumentLibrary(...) 
getMergeTag(...) 
getRecordNav(...) 
The transaction Object 
How Formulas Work 
Related Topics 

The System value allows access to system information and functions that are maintained internally, but which are normally not available in Relate. The System data includes answers to such question as, "Who is the current user?", "Who created this and when?", "Who last modified this and when?", "What is the URL to this?" and "What unit is this data in?"

At least one System value is available in any formula in Relate. In a Relate field formula, the System value is available as a variable named System.  In other types of formulas, a System value is available for each form with a form id.  It is accessed from the form as a field called System. For example, if there is a form which has been given a formula id of myForm, access the System data using myForm.System.  Additionally, for multi-entry forms each entry has a System value accessed in the same manner. So, for a multi-entry form with a formula id of multiForm, access the System value for the first entry by writing multiForm[0].System.

System data is represented using a custom data type.  In some Relate Script system messages, the type will be referred to by the generic data type name, Object.  Some messages will refer to the more specific data type name, System.

A System value has many fields detailed below. All of the fields are read-only.  There are also several functions which work specifically with System values and which can change certain system properties and perform other system tasks. The column (F) is checked if the field/method applies to fields.  The column (S) is checked if the field/method applies to Strings that represents a system key.

 

Field Name F S Description
curUserFirstName X X A String field containing the first name of the currently logged in user.  This may be null if no user is logged in.
curUserLastName X X A String field containing the last name of the currently logged in user.  This may be null if no user is logged in.
curUserUsername X X A String field containing the username of the currently logged in user.  This may be null if no user is logged in.
curUserId X X A String field containing the id of the primary form of the currently logged in user.  This may be null if no user is logged in or a global user.
curAnyUserId X X A String field containing the id of the primary form of the currently logged in user OR global user.  This may be null if no user is logged in.v
isGlobalUser X X A boolean field containing true or false if the current user is a super user.
curUserEmail X X A String field containing the email address of the currently logged in user.  This may be null if no user is logged in.
curUserCredential X X A String field containing the current professional credential of the currently logged in user.  Credentials are an optional feature that may not be enabled for your organization.
curUserIP X X A String field containing the IP address of the currently logged in user, or the current anonymous user if no one is logged in.  This may be null if the formula is running as part of a background system process.
curUserUnitName X X A String field containing the name of the Unit the current user's record is in.
curUserTimeZone X X A String field containing the first name of the currently logged in user, or the current anonymous user if no one is logged in.  This even works if the formula is running as part of a background system process, in which case you may get the system default time zone, "SystemV/MST7".
curProtocol X X A String field containing the protocol of the current request.  It will normally either be "http" or "https".  If the current formula is not running as part of a page request, for instance as part of a scheduled formula, on-demand formula or other system process, this field will be null.
curDomainName X X A String field containing the domain name of the current request.  It will normally end with ".bluestep.net".  If the current formula is not running as part of a page request, for instance as part of a scheduled formula, on-demand formula or other system process, this field will be null.
curPort X X An Integer field containing the port of the current request.  It will normally either be 80 or 443 as these are the standard ports for HTTP and HTTPS respectively.  If the current formula is not running as part of a page request, for instance as part of a scheduled formula, on-demand formula or other system process, this field will be null.
curPath X X A String field containing the path of the current request.  It will normally start with "/" and end with ".jsp".  If the current formula is not running as part of a page request, for instance as part of a scheduled formula, on-demand formula or other system process, this field will be null.
curQueryString X X A String field containing the query string of the current request.  This is the part of the URL after the question mark.  Some pages do not have a query string.  If the current formula is not running as part of a page request, for instance as part of a scheduled formula, on-demand formula or other system process, this field will be null.  In the BlueStep platform EVERY page has multiple potential URLs with various query strings all representing the exact same page and data. DO NOT write logic that depends on the query string being exactly a certain way.
curURL X X A String field containing the URL of the current request.  This is the path plus query string, if any, with a question mark separator.  If the current formula is not running as part of a page request, for instance as part of a scheduled formula, on-demand formula or other system process, this field will be null.
curFullURL X X A String field containing the fully qualified URL of the current request.  This will include the protocol. domain name, port, path and query string as appropriate. If the current formula is not running as part of a page request, for instance as part of a scheduled formula, on-demand formula or other system process, this field will be null.
curServer X X Returns the current server executing the formula.

modifiedFirstName

X X A String field containing the first name of the last person to modify this entry.  This may be null if the entry has not yet been saved. It may also be null if the current System value is from a multi-entry list Array, rather than from a particular entry.
modifiedLastName X X A String field containing the last name of the last person to modify this entry.  This may be null if the entry has not yet been saved. It may also be null if the current System value is from a multi-entry list Array, rather than from a particular entry.
modifiedUsername X X A String field containing the username of the last person to modify this entry.  This may be null if the entry has not yet been saved.  It may also be null if the current System value is from a multi-entry list Array, rather than from a particular entry.
modifiedId X X A String field containing the id of the primary form of the last person to modify this entry.  This may be null if the entry has not yet been saved. It may also be null if the current System value is from a multi-entry list Array, rather than from a particular entry.
modifiedEmail X X A String field containing the email address of the last person to modify this entry.  This may be null if the entry has not yet been saved. It may also be null if the current System value is from a multi-entry list Array, rather than from a particular entry.
modifiedCredential X X A String field containing the professional credential, as of the modification timestamp, of the last person to modify this entry.  Credentials are an optional feature that may not be enabled for your organization.
modifiedTimestamp X X A String field containing the date and time of the last modification of this entry.  This may be null if the entry has not yet been saved. It may also be null if the current System value is from a multi-entry list Array, rather than from a particular entry.
createdFirstName X X A String field containing the first name of the person who created this entry.  This may be null if the entry has not yet been saved. It may also be null if the current System value is from a multi-entry list Array, rather than from a particular entry.
createdLastName X X A String field containing the last name of the person who created this entry.  This may be null if the entry has not yet been saved. It may also be null if the current System value is from a multi-entry list Array, rather than from a particular entry.
createdUsername X X A String field containing the username of the person who created this entry. This may be null if the entry has not yet been saved. It may also be null if the current System value is from a multi-entry list Array, rather than from a particular entry.
createdId X X A String field containing the id of the primary form of the person who created this entry. This may be null if the entry has not yet been saved. It may also be null if the current System value is from a multi-entry list Array, rather than from a particular entry.
createdEmail X X A String field containing the email of the person who created this entry. This may be null if the entry has not yet been saved. It may also be null if the current System value is from a multi-entry list Array, rather than from a particular entry.
createdCredential X X A String field containing the professional credential, as of the creation timestamp, of the person who created this entry.  Credentials are an optional feature that may not be enabled for your organization.
createdTimestamp X X A String field containing the date and time this entry was created.  This may be null if the entry has not yet been saved.  It may also be null if the current System value is from a multi-entry list Array, rather than from a particular entry.
editURL   X Edit url if the key has one.
deleteURL   X Delete url if the key has one.
viewURL X X A String field containing the URL to view and/or edit this entry.  This may be null if the entry has not yet been saved. It may also be null if the current System value is from a multi-entry list Array, rather than from a particular entry.  This value is always a relative URL meaning it does not contain the protocol prefix or domain name such as http://xyzzy.bluestep.net. 
printURL X
A String field containing the URL to view this entry in a format suitable for printing.  This is most important for text and memo fields where the full value may not be visible within the smaller edit box.
listURL X
A String field containing the URL to view list the entries of a multi-entry form.  This value will be null for single-entry forms.  This value is always a relative URL, meaning it does not contain the protocol prefix or domain name such as http://xyzzy.bluestep.net. 
newEntryURL X
A String field containing the URL to create a new entry of this form.  This value will be null for single-entry forms.  This value is always a relative URL meaning it does not contain the protocol prefix or domain name such as http://xyzzy.bluestep.net. 
summaryURL X
A String field containing the URL to view and/or edit this entry.  This may be null if the current record has not yet been saved.  This value is always a relative URL meaning it does not contain the protocol prefix or domain name such as http://xyzzy.bluestep.net. 
profileViewURL X
A String field containing the URL to view and/or edit this entry within the User Profile/My Account area.  The URL contained by this field only works correctly when clicked by the user who's record the current entry belongs to.  Other users will receive an error when attempting to go to the URL.
profileListURL X
A String field containing the URL to view list the entries of a multi-entry form within the User Profile/My Account area.  The URL contained by this field only works correctly when clicked by the user who's record the current entry belongs to.  Other users will receive an error when attempting to go to the URL.
profileNewEntryURL X
A String field containing the URL to create a new entry of this form within the User Profile/My Account area.  The URL contained by this field only works correctly when clicked by the user who's record the current entry belongs to.  Other users will receive an error when attempting to go to the URL.
lastAccountLogin
X
A DateTime field indicating the last time the user who's account this entry belongs to interacted with the BlueStep platform.  Interaction may include logging in, logging out, expanding/collapsing navigation items or various other system-level activities within the platform.
lastFullLogin X X A DateTime field indicating the last time the user who's account this entry belongs to logged in by providing their username and password or equivalent (such as login via OpenID).
lastFullLoginIP X X A String field indicating the last IP Address the user who's account this entry belongs to logged in via a web-browser.
lastCookieLogin X X A DateTime field indicating the last time the user who's account this entry belongs to logged in via a web-browser cookie without providing their username or password.  Cookie login ("Remember me" functionality) is disabled in many organizations, so this field is often null.
userTimeZone X X A String field indicating the preferred time zone of the user who's account this entry belongs to.
id X X A String field containing the internal system identifier without the organization identiifier of the current entry. This may be null if the entry has not yet been saved. It may also be null if the current System value is from a multi-entry list Array rather than from a particular entry.
fqId X X A String field containing the fully qualified internal system identifier of the current entry. This may be null if the entry has not yet been saved. It may also be null if the current System value is from a multi-entry list Array rather than from a particular entry.
shortId X X A String field containing the short internal system identifier of the current entry. This may be null if the entry has not yet been saved. It may also be null if the current System value is from a multi-entry list Array rather than from a particular entry.
documentLibraryURL X   A String field containing the url of the docucmentLibrary.
orgU X X A String field containing the organization identifier.
orgName X X A String field containing the name of the organization containing this entry. This may be null if the current record has not yet been saved and the organization where it will be saved has not yet been determined.
orgDefaultDomain X X A String field containing the default domain name of the organization containing this entry. This may be null if the current record has not yet been saved and the organization where it will be saved has not yet been determined.
orgDescription X X A String field containing the description of the organization containing this entry. This may be null if the current record has not yet been saved and the organization where it will be saved has not yet been determined.
orgContactName X X A String field containing the contact name of the organization containing this entry. This may be null if the current record has not yet been saved and the organization where it will be saved has not yet been determined.
orgContactAddress X X A String field containing the contact address of the organization containing this entry. This may be null if the current record has not yet been saved and the organization where it will be saved has not yet been determined.
orgContactPhone X X A String field containing the contact phone number of the organization containing this entry. This may be null if the current record has not yet been saved and the organization where it will be saved has not yet been determined.
orgContactEmail X X A String field containing the contact email address of the organization containing this entry. This may be null if the current record has not yet been saved and the organization where it will be saved has not yet been determined.
orgSupportEmail X X A String field containing the support email address of the organization containing this entry. This may be null if the current record has not yet been saved and the organization where it will be saved has not yet been determined.
unitName X X A String field containing the name of the unit containing this entry. This may be null if the current record has not yet been saved and the unit where it will be saved has not yet been determined.
unitDefaultDomain X X A String field containing the default domain name of the unit containing this entry. This may be null if the current record has not yet been saved and the unit where it will be saved has not yet been determined.
unitDescription X X A String field containing the description of the unit containing this entry. This may be null if the current record has not yet been saved and the unit where it will be saved has not yet been determined.
unitContactName X X A String field containing the contact name of the unit containing this entry. This may be null if the current record has not yet been saved and the unit where it will be saved has not yet been determined.
unitContactAddress X X A String field containing the contact address of the unit containing this entry. This may be null if the current record has not yet been saved and the unit where it will be saved has not yet been determined.
unitContactPhone X X A String field containing the contact phone number of the unit containing this entry. This may be null if the current record has not yet been saved and the unit where it will be saved has not yet been determined.
unitContactEmail X X A String field containing the contact email address of the unit containing this entry. This may be null if the current record has not yet been saved and the unit where it will be saved has not yet been determined.
unitSupportEmail X X A String field containing the support email address of the unit containing this entry. This may be null if the current record has not yet been saved and the unit where it will be saved has not yet been determined.
unitHQURL X X A String field containing the URL of the HQ application for the unit containing this entry.
unitManageURL X X A String field containing the URL of the Manage application for the unit containing this entry. Can be null if Manage has not yet been created for that unit.
formName X   A String field containing the name of the form to which this System value is attached. This should never be null.
formLabel X   A String field containing the label of the form to which this System value is attached. When blank, the form name is returned.
justCreated X   A Boolean field indicating whether this entry was created during the current edit process.  This value will be null if the current System value is from a multi-entry list Array, rather than from a particular entry.
sourceEntry X   If this entry was just created, it may have been copied from another entry.  In that case, this field will contain that entry in a read-only state.  Care should be taken in comparing the fields of the source entry with the fields of the current entry.  Under certain circumstances it is possible for the edit process to cause changes to both the source entry and this entry making a valid comparison impossible.  There is currently no way to detect this situation in formula.
isLocked X X A Boolean value indicating whether the entry is locked, including pending locks.
pendingLock X X A Boolean value indicating whether the entry is locked, but the lock is not yet committed to the database.
pendingUnlock X X A Boolean value indicating whether the entry is recently unlocked, but still locked in the database.  In this state signature fields can be signed via formula.
lockExpire X X A DateTime value indicating when the current lock will expire.  This value is null if not locked.
lockName X X A String value containing the lock name.  This value is null if not locked.
lockerFirstName X X A String value containing the first name of the user who locked this entry.
lockerLastName X X A String value containing the last name of the user who locked this entry.
lockerUsername X X A String value containing the username of the user who locked this entry.
lockerId X X A String value containing the id of the record type form entry of the user who locked this entry.
lockerEmail X X A String value containing the email address of the user who locked this entry.
curCategories X   An array value of type String[Integer] listing the currently stored record categories of the record.
pendingCategories X   An array value of type String[Integer] listing the categories of the record with pending category changes applied.
allCategories X   An array value of type Boolean[String] listing all possible categories for the current record.  The array is indexed by the names of the categories and the boolean value indicates if the record will be in the category after pending change are applied.
displayName   X Display name of the key. If the key can't be resolved then it returns it's current value.
historicVersion  X
A int value containing the current version of the given entry.
 
Function Name F S Description
getNewEntry( )
getNewEntry(sourceEntry)
X   This function creates a new entry of a multi-entry form and gives the new entry as its result.  For single entry forms or for read-only forms this function results in an empty, read-only dummy value and does not actually create an entry.  You may optionally pass a source entry to copy from.  You may alternatively pass the System field of the source entry in place of the source entry.
deleteEntry(...) X   This function marks the current entry for deletion and returns a boolean value indicating success.  Note that this function will result in data being permanently deleted and should be used with extreme caution.  Furthermore, keep in mind that formulas can even delete the one entry of a single-entry form.  In this case, it deletes the one-and-only entry making it appear as if that form was never filled out.  Also remember, this function simply marks the entry for deletion.  The actual deletion occurs later, so reading from and updating the entry can continue for the remainder of the formula.  Specifically, the deletion occurs the next time ANY data reaches step 6 or 8 in the 8 step edit process.  This function nearly always results in true; however, this function will result in false if called on a read-only form or if the current System value is from a multi-entry list Array, rather than from a particular entry.
lock(name, expire) X X Locks the current entry.  The expire value is not required and defaults to one hour for a new lock, or the current expire DateTime for an existing lock.  This function results in a String value indicating the version of the current entry.  The result may be null if the lock was unsuccessful.
unlock(version) X X Unlocks the current entry given the version of the current entry.  Results in a Boolean value indicating if the unlock was a success.
addCategory(name) X   Adds a category by name to the current record.  The result is a boolean value which is true if the category was successfully added, false if the record already belonged to the category (or it was pending) and null if the category name cannot be added because it is invalid, the record is read-only or there is some other error.  See the note below for important storage issues.
removeCategory(name) X   Removes a category by name from the current record.  The result is a boolean value which is true if the category was successfully removed, false if the record doesn't belong to the category (or it was pending removal) and null if the category name cannot be removed because it is invalid, the record is read-only or there is some other error.  See the note below for important storage issues.
setUnit(id) X  

Moves the record to the same unit as the data identified by 'id'.  The result of the function is a boolean value which is true if the move is successful, false if it is unsuccessful due to a server error such as a non-existent id object and null if the move cannot occur because the data is null or read-only or the id is not in a valid format.  See the note below for important storage issues.

This is intended to used in conjunction with a relationship field where you select a record belonging to a different unit, and the formula moves the current record to the same unit as the selected record.  However, other usages are also possible.  Using this technique it is possible to allow users to move records without granting Editor to the record type and thus opening up permission to other more dangerous functions, such as delete record.

runFormula(id, when, mssg, expired) X  

The runFormula(...) function causes an on-demand formula to be run.  The function has four parameters.  The last three parameters are optional.  

  • The id parameter is the unique id defined at the bottom of step 2 when creating the on-demand formula.  
  • The when parameter determines when the formula will run.  If omitted, the formula will be scheduled immediately after the current transaction completes (or immediately if there is no transaction).  The when parameter can be a DataTime, an Integer or a DateDiff.  An integer specifies a delay from the current time in milliseconds.  A date diff value also specifies a delay.
  • The mssg parameter optionally provides a message to the on-demand formula for the execution currently being scheduled.  It will be available in the on-demand formula as a String variable named message.
  • The expired parameter will not allow the formula to be ran after the provided time.  If omitted, the formula will run as soon as it can after the time it was scheduled. This should be utilized when running frequent routine calculations. Note, the expried by should be after (greater than) the start or the formula will not run.  The expired parameter can be a DataTime, an Integer or a DateDiff.  An integer specifies a delay from the current time in milliseconds.  A date diff value also specifies a delay.

The result of the runFormula(...) function is a String value.  If the result is null then the formula has been scheduled successfully.  If the Result is not null, then it will contain an error message explaining why the operation was not successful.  For example, if the when parameter is a DateTime that is in the past then the message will indicate that on-demand formulas cannot be scheduled for times that are past.  Other messages are related to complying with the configuration of the on-demand formula.  For instance, if the on-demand formula is configured to run in only one particular unit and the record is not in that unit, or if the formula requires certain categories that are not present the result message will explain this.  Especially important to remember is that, if the formula has a primary form then the runFormula(...) function must be called from a System field belonging to an entry of that form.  The record and form entry that the System field belongs to become the context of the on-demand formula, its "current record" and "current entry", when executing.

Final note:  If the formula calling the runFormula(...) function is part of a transaction (data is being modified) and the transaction is rolled back due to an error, then the on-demand formula will not be scheduled even though no error message was given as the a result of calling this function.  This is because all changes, including the scheduling of the on-demand formula, are rolled back.

getMergeReports(search) X   Gets a list of merge reports that have the current form as their primary form and which apply to the current record (based on category restrictions).  An optional search value may be given which filters the list of reports to those who's names contain the given search string.  The result of this function is an array indexed by Integer.  The merge report objects have a number of properties which are described below.
lookupMergeReport(name, value) X  

Get a single relatescript merge report which has its primary form as the current form, applies to this record, and has the custom lookup property specified by the name and value parameters given.  If the name begins with an under-bar, indicating that the property may not be unique, then the first merge report found will be returned.  The merge report object has a number of properties which are described below.

lookupMergeReportScript(name, value) X  

Get a single bs.js merge report which has its primary form as the current form, applies to this record, and has the custom lookup property specified by the name and value parameters given.  If the name begins with an under-bar, indicating that the property may not be unique, then the first merge report found will be returned.  The merge report object has a number of properties which are described below.

getVersions() X X Get an array of versions of this entry from the change history system.  The result is an array indexed by version numbers.  Versions are kept in the change history system for two years before being archived.  Each entry in the array is a read-only form entry object representing the state of the entry at a specific date and time.  Currently relationship fields and document fields do not support historical versions via this method as their data and history is stored differently than other field types.  In other words, nearly all field data and all applicable System data can be retrieved from historical entries, however, relationship fields and document fields will still show current values instead of historical values.

versionArray = cur.System.getVersions()
out = "";
for(index = versionArray.lastIndex(); index >= 0; index--){
  curVer = versionArray[index];
  prevVer = versionArray[(index - 1)];
  if(prevVer.System.modifiedTimestamp != null){
    modifier = curVer.System.modifiedFirstName + " " + curVer.System.modifiedLastName;     modified = curVer.System.modifiedTimestamp;     include = false;     html = "<strong>Modified " + modified + " by " + modifier + '</strong>';
    if(curVer.boolField != prevVer.boolField){       include = true;       html += '<br>Boolean Field: ';       if(prevVer.boolField != null){         html += '<span class="diffDel">' + prevVer.boolField + '</span> ';       }       html += '<span class="diffAdd">' + curVer.boolField + '</span> ';     }     if(include) out += html + '<br><br></div><hr>';   } }
The String version returns an array of keys.
getDeletedEntries(...) X  

Retrieves an array of deleted entries of the current form.  Optionally, it can retrieve only entries deleted within a certain timeframe.  The function receives two optional DateTime values indicating the start and end times from which to retrieve deleted entries.  If only one DateTime value is given, it acts as a start time with the end time being the present time.  The result of this function is an array of custom objects with the following properties:

  • entry -- The historical form entry as it was when it was deleted.  This is the same type of form entry retrieved by the getVersions() function above.  Please read about the restrictions in reproducing historical data, especially with regard to document and relationship fields.
  • id -- The original id of the deleted entry.
  • timestamp -- The timestamp when the form entry was deleted.
  • getVersions() -- Behaves identically to the getVersions() function of the System object, but for the deleted entry.  The "first" entry will always have version of -1.  The -1 version is created during deletion by convention of the underlying platform logic.
setUserTimeZone(timezone) X  

Sets a user timezone with the required timezone string passed into the function. Timezones should be formatted in the following manner "US/Pacific", "US/Mountain", "US/Phoenix", etc.

isLayout(layout) X  

Deprecated:  Use isLayout() instead. 

createUnit(unitName, supportEmail, contactName, contactAddress, contactPhone, contactEmail) X X

This function will create a child unit under the unit of the selected record. Only required fields during the unit creation are supported. Any additional information will have to be entered after. The ID of the newly created unit will be returned if this is successful. Null will return if unsuccessful.

getAncestor(type)   X Returns the key of first ancestor that maches the required type.
getParent(type)   X Returns the key of first parent that matches the optional type.
getParents(type)   X Returns an array of parent keys that match the optional type.
getChild(type)   X Returns the key of the first child that matches the required type.
getChildren(type)   X Returns an array of children keys that match the optional type.

Note: Category and unit changes are not stored instantly to the database.  They are stored after the current formula(s) completes (formulas may run in small batches during complex edits).  The category and unit changes will be stored before other types of saves are completed and before other batches of formulas run.

RelateMergeReport Properties

Field Name Description
name The name of the merge-report
label The label of the merge-report
id The id of the merge-report combined with the id of the current record and/or entry.  This id can be used with the _destId parameter to cause an edit to return to the merge report when clicking save.
fqId The fully qualified id of the merge-report combined with the id of the current record and/or entry.  This id can be used with the _destId parameter to cause an edit to return to the merge report when clicking save.
viewURL The url to view the form entry via this merge-report
printURL The url to print the form entry via this merge-report
contentOnlyUrl The url to view only the form entry (no header or other page content) via this merge-report
resolve Resolve the merge tags
profileURL The url to view the form entry via this merge-report and with "My Account" or profile navigation rather than standard record navigation.
newEntryURL The url to create a new entry via this merge-report.
profileNewEntryURL The url to create a new entry via this merge-report and with "My Account" or profile navigation rather than standard record navigation.
copyEntryURL The url to create a new entry by copying the form entry and display/edit the new entry via this merge-report. 
profileCopyURL The url to create a new entry by copying the form entry and display/edit the new entry via this merge-report and with "My Account" or profile navigation rather than standard record navigation.
customProps An array value of type String[String] containing all of the custom look-up properties of the current merge-report.

RelateMergeReport Methods

resolveWithForm(action) Resolve the merge tags using a form.  This method will render the merge tags with their editable fields.  The parameter action is optional.  If present and not null then the returned String will be wrapped with <form></form> using the value action. Otherwise no wrapping occurs.
content(newContent) Temporarly use newContent instead of the content saved with the mergeReport. Returns the previously saved content (Step 4 contents).
resolve(newContent) Temporarly use newContent instead of the content saved with the mergeReport and resolve it.