linkAttachment

Parameters

  • attachmentId - The ID of the attachment

  • appName- The name of the app config

  • recordId - The ID of the record of the app config

  • documentTypeId - (optional) The ID of the documentType you want to set

The documentTypeId parameter is optional. If used, the attachment type is changed.

Example Usages

// This links attachment 1 to record ID 4711 of the customerOrder.
app.linkAttachment(1, "customerOrder", 4711);
// This links attachment 1 to record ID 4711 of the customerOrder,
// and additionally sets the attachment's documentTypeId to 5.
app.linkAttachment(1, "customerOrder", 4711, 5);

Return Values

The function returns a boolean value, either true or false.

Last updated

Was this helpful?