Print

eDoreczenia_ReceiveTechnicalEvidences

The eDoreczenia_ReceiveTechnicalEvidences() function downloads all technical evidences for the specified message as a zipped archive (.zip file) from the e-Doręczenia system (PURDE/PUH service). The downloaded file can be saved into one of the selected places:

  • external location (i.e. local drive of the server that hosts the app or a network share);
  • the specified field on the case form;
  • case document list.

Syntax

eDoreczenia_ReceiveTechnicalEvidences(mailboxId, messageId, storageInfo);

Function arguments

  • mailboxId – (String) an identifier of the mailbox which stores the message for which technical evidences will be downloaded. Mailbox has to be registered in AMODIT with unique id.
  • messageId – (String) an identifier of the message for which the technical evidences will be retrieved.
  • storageInfo – (Object) an argument which defines a place where the zipped archive with technical evidences will be stored.

Return value

The eDoreczenia_ReceiveTechnicalEvidences() function returns Object.
This complex object contains following properties:

  • Success – returns True, if the operation succeeds;
  • CombinedErrorMessage – returns a description of the error in case of the operation failure.

Examples

Example 1

In this example the eDoreczenia_ReceiveTechnicalEvidences() function downloads a zipped file with all technical evidences associated to the message with its id stored in the field 'messageId’ on the case. The file with technical evidences will be saved in the location '\\my-networkshare\folder1′.

// select mailbox by passing its id
mailboxId = 'TestMailbox1';

// choose the storage type, available values: 'externalLocation', 'listOfDocuments' and 'field'
storageInfo.storageType = 'externalLocation';

// set a name for file with zipped technical evidences (optional)
storageInfo.filename = 'mycustomname123.zip';

// set a name of the field where downloaded file with evidences should be placed
// (property is required only when storageType is set to 'field')
storageInfo.fieldName = 'myDocumentTypeField';

// set the external location where file with evidences should be placed
// (property is required only when storageType is set to 'externalLocation')
storageInfo.externalLocation = '\\my-networkshare\folder1';

// set flag to true in order to allow for overriding attachments
storageInfo.overrideAttachment = true;

// execute the function with previously prepared arguments
response = eDoreczenia_ReceiveTechnicalEvidence(mailboxId, [messageId], storageInfo);

// verify status of operation
if (!response.Success)
{
  ShowMessage(1,response.CombinedErrorMesage); // display error message in case of failure
}

 

Czy artykuł był pomocny?
0 na 5 gwiazdek
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
How Can We Improve This Article?