Forms
Updated on Sep 6, 2023 3 minutes to readDownload print form
Syntax:
E8App.$forms.downloadPrintForm(<listScriptAlias>, <id>, <printFormScriptAlias>, <params>)
Description:
Initiates print form download.
Parameters:
<listScriptAlias> - required
Type: String
Script alias of the list object to which the print form is attached.
<id> - required
Type: Type: Number | Number[ ].
Object list Id/array of object list id.
<printFormScriptAlias> - required
Type: Type: String | String[ ].
Print form script alias/array of print form script aliases.
<params> - optional
Type: Object
Print form download settings.
{ basename: <string> filename with file extension,filename: <string> filename without file extension,
inline: <boolean> True means file content will be displayed in the browser, False - file content or file download will open in the same tab }
Returned value:
Void.
E8App.$forms.downloadPrintForm('lstSalesInvoices', 3, 'invoice', {basename: 'form.pdf', filename: 'form', inline: true});
Get parameter
Syntax:
E8App.$forms.getParam(<name>)
Description:
Gets the form value by name.
Parameters:
<name> - required
Type: String
Value name.
Returned value:
Any.
E8App.$forms.getParam('code')
Get parameters
Syntax:
E8App.$forms.getParams()
Description:
Gets all the form values.
Returned value:
Type: Object
E8App.$forms.getParams()
Get print form
Syntax:
E8App.$forms.getPrintForm(<listScriptAlias>, <id>, <printFormScriptAlias>, <params>)
Description:
Creates a temporary file which can be attached to the object or emailed.
Parameters:
<listScriptAlias> - required
Type: String
Script alias of the object to which the print form is attached.
<id> - required
Type: Type: Number | Number[ ].
Object list Id/array of object list id.
<printFormScriptAlias> - required
Type: Type: String | String[ ].
Print form script alias/array of print form script aliases.
<params> - optional
Type: Object
Print form download settings.
{ basename: <string> filename with file extension,filename: <string> filename without file extension,
inline: <boolean> True specifies file content will be displayed in the browser, False - file content or file download will open in the same tab }
Returned value:
Type: Object
{ id: "99f4133c-9665-4404-a78b-86c047165efb",text: "form.pdf",
to: [ ],
bcc: [ ],
cc: [ ] }
E8App.$forms.getPrintForm('lstSalesInvoices', [2, 3], 'invoice', {basename: 'form1.pdf', filename: 'form1', inline: true});
Get title
Syntax:
E8App.$forms.getTitle()
Description:
Gets the form title.
Returned value:
Type: String
E8App.$forms.getTitle();
Open
Syntax:
E8App.$forms.open(<scriptAlias>, <id>, <fillingValues>, <formScriptAlias>, <sourceId>)
Description:
Opens a metadata form (list, page, report).
Parameters:
<scriptAlias> - required
Type: String
Script alias of the metadata object.
<id> - required
Type: Number | null.
List object id or null if metadata type is not a list.
<fillingValues> - optional
Type: Object.
Form values.
<formScriptAlias> - optional
Type: String.
Form script alias.
<sourceId> - required
Type: Number | Null.
Object Id if the form is copied.
Returned value:
Void.
E8App.$forms.open('lstGoods', 3, {name: 'test', myParam: 'Hello'}, 'myForm', null);
Open print form
Syntax:
E8App.$forms.openPrintForm(<scriptAlias>, <id>, <printFormScriptAlias>, <params>)
Description:
Initiates print form download.
Parameters:
<scriptAlias> - required
Type: String
Script alias of the object to which the print form is attached.
<id> - required
Type: Type: Number | Number[ ].
Object list Id/array of object list id.
<printFormScriptAlias> - required
Type: Type: String | String[ ].
Print form script alias/array of print form script aliases.
<params> - optional
Type: Object
Print form opening options.
{ basename: <string> filename with file extension,filename: <string> filename without file extension,
inline: <boolean> True specifies file content will be displayed in the browser, False - file content or file download will open in the same tab }
Returned value:
Void.
E8App.$forms.openPrintForm('lstGoods', 3, 'barcodes', {basename: 'form.pdf', filename: 'form', inline: true});
Set title
Syntax:
E8App.$forms.setTitle()
Description:
Sets the form title.
Returned value:
E8App.$forms.setTitle('New title');