Class AttachedDocument
- All Implemented Interfaces:
UserGroupRestrictedObject
Each instance describes one attached document: its typed ID, label, unique name, status, workflow status, and who created, updated, submitted, approved or denied it. The object is a snapshot and cannot be saved back. Use it to read information about the attached documents, not to modify them.
You get a list of these objects from api.findAttachedDocuments(typedId, lineId, filters).
Logic code does not create instances directly.
Deprecated: The Deal Planning module has been discontinued since version 11.3.0, and
api.findAttachedDocuments is deprecated. There is no replacement.
Note: getCreateDate() and getLastUpdateDate() return formatted date-time strings,
not date objects. isFinal() is set by api.findAttachedDocuments. isAttached() is
not set by that call and always returns false.
- Since:
- 6.0 - Vesper
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classInternal: identifier of an attached document in the database, made of the document ID and its typed ID.static enumCommon status of an attached document. -
Field Summary
Fields inherited from interface UserGroupRestrictedObject
FIELD_USERGROUPEDIT, FIELD_USERGROUPVIEWDETAILS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the user who approved the document.Returns the date this document was created, as a formatted date-time string, ornullif it is not set.Returns the ID of the user who created the document.Returns the name of the user who created the document.Returns the date and time when the document was deleted.Returns the ID of the user who deleted the document.Returns the name of the user who denied the document.Returns the typed ID of the document, for example1234.Qfor a Quote or56.CTfor a Contract.DocumentRef.DocumentTypeReturns the kind of the document, for exampleQUOTE,CONTRACTorPRICE_LIST.getLabel()Returns the label (display name) of the document.Returns the ID of the user who last updated the document.Returns the name of the user who last updated the document.Returns the date this document was last updated, as a formatted date-time string, ornullif it is not set.Returns the status of the document, mapped to a common list of statuses for all kinds of documents.Returns the name of the user who submitted the document for approval.TypeCodeReturns the type code of the document, for exampleQfor a Quote orCTfor a Contract.Returns the typed ID of the document, for example1234.Q.Returns the unique name of the document's type, for example the Quote Type of a Quote or the Claim Type of a Claim.Returns the unique name of the document, for exampleP-1234for a Quote.Returns the User Groups that can edit the document.Returns the User Groups that can view the details of the document.Returns the version number of the document.Workflow.WorkflowStatusReturns the status of the approval workflow of the document, for exampleSUBMITTEDorAPPROVED.booleanChecks whether the document is attached to the Deal Plan.booleanChecks whether the document is deleted.booleanisFinal()Checks whether the document is marked as final in the Deal Plan.voidsetAttached(boolean attached) Internal: used by the server to set the attached flag.voidsetFinal(boolean isFinal) Internal: used by the server to set the final flag.voidsetUserGroupEdit(String userGroupEdit) Internal: used by the server.voidsetUserGroupViewDetails(String userGroupViewDetails) Internal: used by the server.toString()Returns the typed ID of the document, for example1234.Q.
-
Constructor Details
-
AttachedDocument
public AttachedDocument()
-
-
Method Details
-
getCreatedBy
Returns the ID of the user who created the document.- Returns:
- User ID, or
nullif it is not set. - See Also:
-
getLastUpdateBy
Returns the ID of the user who last updated the document.- Returns:
- User ID, or
nullif it is not set. - See Also:
-
getDeleteDate
Returns the date and time when the document was deleted.- Returns:
- Delete date, or
nullif the document is not deleted.
-
getDeletedBy
Returns the ID of the user who deleted the document.- Returns:
- User ID, or
nullif the document is not deleted.
-
isDeleted
public boolean isDeleted()Checks whether the document is deleted.- Returns:
trueif the document is deleted.
-
getVersion
Returns the version number of the document. The number goes up each time the document is saved.- Returns:
- Version number.
-
getCreateDate
Returns the date this document was created, as a formatted date-time string, ornullif it is not set. -
getLastUpdateDate
Returns the date this document was last updated, as a formatted date-time string, ornullif it is not set. -
getLabel
Returns the label (display name) of the document.- Returns:
- Label, or
nullif it is not set.
-
getUniqueName
Returns the unique name of the document, for exampleP-1234for a Quote. For a Price List, this is its ID; for a Simulation or a Live Price Grid, its typed ID (for example12.SIM).- Returns:
- Unique name.
-
getDocTypedId
Returns the typed ID of the document, for example1234.Qfor a Quote or56.CTfor a Contract. The same asgetTypedId().- Returns:
- Typed ID of the document.
-
getDocumentType
public DocumentRef.DocumentType getDocumentType()Returns the kind of the document, for exampleQUOTE,CONTRACTorPRICE_LIST.- Returns:
- Document type.
- See Also:
-
getTypedId
Returns the typed ID of the document, for example1234.Q. The same asgetDocTypedId().- Returns:
- Typed ID of the document.
-
getTypeCode
public TypeCode getTypeCode()Returns the type code of the document, for exampleQfor a Quote orCTfor a Contract.- Returns:
- Type code of the document.
- See Also:
-
getTypeUniqueName
Returns the unique name of the document's type, for example the Quote Type of a Quote or the Claim Type of a Claim. For a Simulation, this is the typed ID of the Price List or Live Price Grid it is based on (for example123.PL).- Returns:
- Unique name of the type, or
nullif the document has no type.
-
getStatus
Returns the status of the document, mapped to a common list of statuses for all kinds of documents. SeeAttachedDocument.DocumentStatus.- Returns:
- Status of the document.
AttachedDocument.DocumentStatus.UNKNOWNif the status cannot be mapped. - See Also:
-
getWorkflowStatus
public Workflow.WorkflowStatus getWorkflowStatus()Returns the status of the approval workflow of the document, for exampleSUBMITTEDorAPPROVED.- Returns:
- Workflow status, or
nullif it is not set. - See Also:
-
getLastUpdateByName
Returns the name of the user who last updated the document.- Returns:
- User name, or
nullif it is not set.
-
getCreatedByName
Returns the name of the user who created the document.- Returns:
- User name, or
nullif it is not set.
-
getSubmittedByName
Returns the name of the user who submitted the document for approval.- Returns:
- User name, or
nullif the document was not submitted.
-
getApprovedByName
Returns the name of the user who approved the document. It depends on the kind of document:- Quote, Contract, Rebate Agreement, Price List and Compensation: the user who last acted on the
approval workflow. It is set only when the workflow status is
SUBMITTED,APPROVEDorNO_APPROVAL_REQUIRED. - Claim, Deal Plan, Custom Form and Model Object: the approver stored on the document.
- Manual Price List, Simulation and Live Price Grid: always
null.
- Returns:
- User name, or
nullif it is not set. - See Also:
- Quote, Contract, Rebate Agreement, Price List and Compensation: the user who last acted on the
approval workflow. It is set only when the workflow status is
-
getDeniedByName
Returns the name of the user who denied the document. It depends on the kind of document:- Quote, Contract, Rebate Agreement, Price List and Compensation: the user who last acted on the
approval workflow. It is set only when the workflow status is
DENIED. - Claim, Deal Plan, Custom Form and Model Object: the user who denied it, as stored on the document.
- Manual Price List, Simulation and Live Price Grid: always
null.
- Returns:
- User name, or
nullif it is not set. - See Also:
- Quote, Contract, Rebate Agreement, Price List and Compensation: the user who last acted on the
approval workflow. It is set only when the workflow status is
-
getUserGroupEdit
Returns the User Groups that can edit the document.- Specified by:
getUserGroupEditin interfaceUserGroupRestrictedObject- Returns:
- User Groups, or
nullif editing is not restricted.
-
setUserGroupEdit
Internal: used by the server. Not for use in logic. The object is a read-only snapshot, so this change is not saved.- Specified by:
setUserGroupEditin interfaceUserGroupRestrictedObject- Parameters:
userGroupEdit- User Groups that can edit the document.
-
getUserGroupViewDetails
Returns the User Groups that can view the details of the document.- Specified by:
getUserGroupViewDetailsin interfaceUserGroupRestrictedObject- Returns:
- User Groups, or
nullif viewing is not restricted.
-
setUserGroupViewDetails
Internal: used by the server. Not for use in logic. The object is a read-only snapshot, so this change is not saved.- Specified by:
setUserGroupViewDetailsin interfaceUserGroupRestrictedObject- Parameters:
userGroupViewDetails- User Groups that can view the details of the document.
-
isFinal
public boolean isFinal()Checks whether the document is marked as final in the Deal Plan.api.findAttachedDocumentssets this value.- Returns:
trueif the document is marked as final.
-
setFinal
public void setFinal(boolean isFinal) Internal: used by the server to set the final flag. Not for use in logic.- Parameters:
isFinal-trueif the document is marked as final in the Deal Plan.
-
isAttached
public boolean isAttached()Checks whether the document is attached to the Deal Plan.api.findAttachedDocumentsdoes not set this value, so it returnsfalsefor the objects that this call returns.- Returns:
trueif the document is attached.
-
setAttached
public void setAttached(boolean attached) Internal: used by the server to set the attached flag. Not for use in logic.- Parameters:
attached-trueif the document is attached to the Deal Plan.
-
toString
Returns the typed ID of the document, for example1234.Q.
-