Methods
-
Appearition.Site.Document.CreateSiteDocument (request, requestOptions)Appearition.Site.Document.SiteDocItemViewModel static
Will create a new record in the database to hold the site document information. Once this returns successfully, you can invoke the UploadSiteDocument method to push the new file up to the server. You will need to pick up the new SiteDocumentId from the return object and pass it to the UploadSiteDocument. Will return an Appearition.Site.Document.SiteDocItemViewModel object
-
Name Type Description requestAppearition.Site.Document.SiteDocItemViewModel Contains the details of the site document
requestOptionsAppearition.RequestOptions Contains the various callback methods for this request
Returns:
Type Description Appearition.Site.Document.SiteDocItemViewModel This is returned as part of the success callback function in the requestOptions param -
Will delete an existing site document. Nothing will be returned unless an error occurs.
-
Name Type Description requestAppearition.Site.Document.SiteDocItemViewModel Contains the details of the site
requestOptionsAppearition.RequestOptions Contains the various callback methods for this request
-
Appearition.Site.Document.SiteDocuments (siteId, requestOptions)Appearition.Site.Document.SiteDocViewModel static
This method will return all documents linked to the specified site record. It will return a collection of Appearition.Site.Document.SiteDocViewModel
-
Name Type Description siteIdnumber uniquely identifies the site for which the documents are being returned
requestOptionsAppearition.RequestOptions configure callbacks
Returns:
Type Description Appearition.Site.Document.SiteDocViewModel This is returned as part of the success callback function in the requestOptions param -
Appearition.Site.Document.UpdateSiteDocument (request, requestOptions)Appearition.Site.Document.SiteDocItemViewModel static
Will setup a new version of the site document. Once this returns successfully, you can invoke the UploadSiteDocument method to push the new file up to the server. You will need to pick up the new SiteDocumentId from the return object and pass it to the UploadSiteDocument. Will return an Appearition.Site.Document.SiteDocItemViewModel object
-
Name Type Description requestAppearition.Site.Document.SiteDocItemViewModel Contains the details of the site
requestOptionsAppearition.RequestOptions Contains the various callback methods for this request
Returns:
Type Description Appearition.Site.Document.SiteDocItemViewModel This is returned as part of the success callback function in the requestOptions param -
Appearition.Site.Document.UploadSiteDocument (siteDocumentId, fileName, fileContent, requestOptions) static
Once the CreateSiteDocument or UpdateSiteDocument methods succeed, invoke this method to upload the file to the server. This will not return anything unless a failure occurs.
-
Name Type Description siteDocumentIdnumber The unique identifier of the Site Document which returned by the CreateSiteDocument or UpdateSiteDocument 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 site document
-
Properties:
Name Type Description SiteDocumentIdnumber The unique identifier of the Site Document. This is a system generated value
SiteIdnumber The unique identifier of the Site this document is linked to
FormIdnumber The unique identifier of the Form this document is linked to (can be empty)
FormNamestring The name of the form if one is linked
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 SiteDocument 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 site and a collection of all its documents
-
Properties:
Name Type Description SiteAppearition.Site.Manage.SiteViewModel The details of the specific site
DocsArray.<Appearition.Site.Document.SiteDocItemViewModel> The collection of documents linked to the site
DocAppearition.Site.Document.SiteDocItemViewModel Is an empty data structure that can be used to setup a new doc for saving to the server
ProjectFormListArray.<Appearition.SelectListItem> A list of forms available. A site document may be allocated to a specific form in a site