SBM ModScript Reference → Programming SBM ModScript → Application Objects → Object Types → ProjectBasedRecord
A ProjectBasedRecord is any record from a primary table. It thus represents items that belong to a project and can be transitioned. ProjectBasedRecord objects require a table ID at creation, so they cannot be created with CreateObject(). Use Ext.CreateProjectBasedRecord().
AppRecord->VarRecord->ProjectBasedRecord
GetProjectId(): Identify the calling record's project.
Input: N/A
Output: N/A
Return: (long integer) – TS_ID of the calling record's project.
StartSubmitToProject( project ) (On-premise only): Starts a submit transition for an item using a project ID, project UUID, or project internal name.
Input: project – Can be project ID, project UUID, or project internal name.
Return: (bool)
Note the following:
Example:
var projectRecord = Ext.CreateProjectBasedRecord( projectTableId ); projectRecord.StartSubmitToProject(projectId);
FinishSubmitToProject( [ signedUserID, signedUserPwd ] ) (On-premise only): Finishes a submit transition for an item.
Input: signedUserID, signedUserPwd – If the transition requires user signature, this is a way to provide the signature.
Return: (bool)
Note the following:
UserID and Pwd required on submit Example:
projectRecord.SetFieldValue( "title", "My Title"); projectRecord.FinishSubmitToProject("UserName", "pass");
QuickSubmitToProject( project [, signedUserID, signedUserPwd ] ) (On-premise only): Identical to FinishSubmitToProject except StartSubmitToProject is not required, and thus, the project must be specified. All field value changes must be in place on the item.
Input: project – Can be project ID, project UUID, or project internal name.
Input: signedUserID, signedUserPwd – If the transition requires user signature, this is a way to provide the signature.
Return: (bool)
UserID and Pwd not required Example:
var projectRecord = Ext.CreateProjectBasedRecord(projectTableId); projectRecord.SetFieldValue( "title" , "My Title" ); projectRecord.QuickSubmitToProject( projectID );
Copyright © 2007–2017 Serena Software, Inc. All rights reserved.