This server-side class is necessary for using the version control system (VCS).

isLocalPackHasReferences(localPackId)


This method checks the record from the sys_vcs_local_pack table if it has referenced current* records from the sys_vcs_record table.

*the current records have the isCurrent attribute is TRUE.


Parameter(s):

NameTypeMandatoryDefault Value
localPackIdIntegerYN


Return:

TypeDescription
BooleanThe method returns TRUE if it finds current records; otherwise, it returns FALSE.


Example:

let vcsLocalPackId = 156144163704236641;
let vcs = new SimpleVcsApi();
if (vcs.isLocalPackHasReferences(vcsLocalPackId)) {
  ss.addInfoMessage('Local Pack has current VCS records');
}


isRetrievedPackHasReferences(retrievedPackId)


This method checks the record from the sys_vcs_retrieved_pack table if it has referenced records from the sys_vcs_record table.


Parameter(s):

NameTypeMandatoryDefault Value
retrievedPackIdIntegerYN


Return:

TypeDescription
BooleanThis method returns TRUE if there are any referenced records; otherwise, it returns FALSE.


Example:

let vcsRetrievedPackId = 156144163704236641;
let vcs = new SimpleVcsApi();
if (vcs.isRetrievedPackHasReferences(vcsRetrievedPackId)) {
ss.addInfoMessage('Retrieved Pack has current VCS records');
}


isRetrievedPackHasAttache(vcsRetrievedPackId)


This method checks the record from the sys_vcs_retrieved_pack table if it has an attached file.


Parameter(s):

NameTypeMandatoryDefault Value
vcsRetrievedPackIdIntegerYN


Return:

TypeDescription
BooleanThis method returns TRUE if there are any attached files; otherwise, it returns FALSE.


Example:

let vcsRetrievedPackId = 156144163704236641;
let vcs = new SimpleVcsApi();
if (vcs.isRetrievedPackHasAttache(vcsRetrievedPackId)) {
  ss.addInfoMessage('Retrieved Pack has attached file');
}