Methods
-
Appearition.Part.Document.CreatePartDocument (request, requestOptions)Appearition.Part.Document.PartDocItemViewModel static
Will create a new record in the database to hold the Part document information. Once this returns successfully, you can invoke the UploadPartDocument method to push the new file up to the server. You will need to pick up the new PartDocumentId from the return object and pass it to the UploadPartDocument. Will return an Appearition.Part.Document.PartDocItemViewModel object
-
Name Type Description requestAppearition.Part.Document.PartDocItemViewModel Contains the details of the Part document
requestOptionsAppearition.RequestOptions Contains the various callback methods for this request
Returns:
Type Description Appearition.Part.Document.PartDocItemViewModel This is returned as part of the success callback function in the requestOptions param -
Will delete an existing Part document. Nothing will be returned unless an error occurs.
-
Name Type Description requestAppearition.Part.Document.PartDocItemViewModel Contains the details of the Part
requestOptionsAppearition.RequestOptions Contains the various callback methods for this request
-
Appearition.Part.Document.PartDocuments (partId, requestOptions)Appearition.Part.Document.PartDocViewModel static
This method will return all documents linked to the specified Part record. It will return a collection of Appearition.Part.Document.PartDocViewModel
-
Name Type Description partIdnumber uniquely identifies the Part for which the documents are being returned
requestOptionsAppearition.RequestOptions configure callbacks
Returns:
Type Description Appearition.Part.Document.PartDocViewModel This is returned as part of the success callback function in the requestOptions param -
Appearition.Part.Document.UpdatePartDocument (request, requestOptions)Appearition.Part.Document.PartDocItemViewModel static
Will setup a new version of the Part document. Once this returns successfully, you can invoke the UploadPartDocument method to push the new file up to the server. You will need to pick up the new PartDocumentId from the return object and pass it to the UploadPartDocument. Will return an Appearition.Part.Document.PartDocItemViewModel object
-
Name Type Description requestAppearition.Part.Document.PartDocItemViewModel Contains the details of the Part
requestOptionsAppearition.RequestOptions Contains the various callback methods for this request
Returns:
Type Description Appearition.Part.Document.PartDocItemViewModel This is returned as part of the success callback function in the requestOptions param -
Appearition.Part.Document.UploadPartDocument (partDocumentId, fileName, fileContent, requestOptions) static
Once the CreatePartDocument or UpdatePartDocument methods succeed, invoke this method to upload the file to the server. This will not return anything unless a failure occurs.
-
Name Type Description partDocumentIdnumber The unique identifier of the Part Document which returned by the CreatePartDocument or UpdatePartDocument methods
fileNamenumber The name of the file being uploaded
fileContentstring The file contents that need to be submitted to the server
requestOptionsAppearition.RequestOptions Contains the various callback methods for this request
Type Definitions
-
This data structure holds the details of a specific Part document
-
Properties:
Name Type Description PartDocumentIdnumber The unique identifier of the Part Document. This is a system generated value
PartIdnumber The unique identifier of the Part this document is linked to
PartNamestring The name of the part
DocumentTitlestring The title of the document. This will differ to FileName
Descriptionstring The description of the document
FileNamestring The description of the document
DocumentVersionnumber The version of the document. You upload a new file to an existing PartDocument and the version number will increment
ModifiedUtcDateDisplaystring The date/time the document was changed. (Format "d/MM/yy HH:mm"). Note, whilst the field name suggest UTC, the server will attempt to convert it to your local timezone if its known. If not the UTC date is simply returned
-
This data structure holds the details of a specific Part and a collection of all its documents
-
Properties:
Name Type Description PartAppearition.Part.PartSummaryViewModel The summary details of the specific Part
DocsArray.<Appearition.Part.Document.PartDocItemViewModel> The collection of documents linked to the Part
DocAppearition.Part.Document.PartDocItemViewModel Is an empty data structure that can be used to setup a new doc for saving to the server