update_email_template

The update_email_template function is used to update the custom letter template.

Copied!
svc=resource/update_email_template&params={"resourceId":<uint>,
				 				 	   "subject":"<text>",			     
				 				 	   "body":"<text>",
	                                   "flags":<uint>}

Parameters

NameDescription
resourceIdThe resource ID of the user.
subjectEmail subject.
bodyEmail body.
flags

Use the default template:

  • 0 — yes;
  • 1 — no.

The following variables can be used in the subject and body text:

NameDescription
%JOB_NOTIFICATION%The name of the job or notification.
%ITEM%The name of the item in the report.
%TEMPLATE%The name of the report template.
%DATE_TIME%Date and time.
%LINK%The link to download the report.

Returned result

Copied!
{"error":0}		/* if the execution is successful */

Possible error codes:

CodeDescription
7Failed to fetch the item with the desired ACL (ADF_ACL_ITEM_VIEW_PROPERTIES and ADF_ACL_ITEM_EDIT_OTHER). 
6Failed to update the email template.
4Wrong input parameters.
Download PDF file
Download Word document

See also