FAQs in this section
What is VTAP?
What tools VTAP provides?
What is Module Designer?
What is API Designer?
Where can I find documentation for VTAP?
Which editions and version supports VTAP?
What is the pricing of VTAP?
What happens to customization done using Customizer in V7 version?
How to get in touch with Platform team?
What is the intent of Developer edition?
What is Vtiger’s Add-on Publisher?
Is Add-ons Publisher available in all the CRM editions?
How do I publish Email Template add-ons?
How do I publish any other module as an add-on?
How do I update a published add-on?
How do I test an add-on?
What are the limitations of the Add-ons Publisher?
Which different add-on features can I publish?
What can a developer publish using Add-on Publisher?
What are the conditions for updating a published add-on?
What are the prerequisites for publishing an add-on?
What is an Insights Designer?
What is the use of Insigts Designer in Vtiger CRM?
What are the queries in Insights Designer?
What are the components of the Insight Designer?
What are the components of a Widget in Insights Designer?
What is the Input tab in Insights Designer?
What is the Transfer tab in Insights Designer?
What is the Output tab in Insights Designer?
What are the benefits of using the Insights Designer?
How do I access the Insights Designer in Vtiger CRM?
How do I create an Insights page?
How do I enable filters for a report?
How do I pin an Insight to the Dashboard?
Is Raw Query support available by default?
In which editions of Vtiger CRM is the VTAP - App Creator available?
Can I set access to my custom apps?
What are Line Item Fields in Insights Designer?
What are Server Scripts and Jobs in Vtiger CRM?
What is a Server Script?
What are Server jobs?
How do I create a Server job?
What are the different helper methods to write server scripts?
What is the Debugging method to write Server scripts?
What are HTTP methods to write server scripts?
What is Vtiger REST API method to write server scripts?
How to write a script for a server job to update stocks weekly in the warehouse system?
How to write a script for a server job for importing daily leads from a file?
How to write a server script to set case SLA by created day?
How to write a server script to calculate the outstanding invoice amount?
How to write a server script for contact email validation and data enrichment?
how to write a server script to update the credit score of a contact?
How can I delete a UI component in the Module Designer?
How to write code for Server Scripts and Jobs?
Table of Contents
Check for the following while writing a script:
- Scripts are written in JavaScript.
- All code must be contained within a main method. Anything outside this method will not execute.
- The main method is invoked automatically and you do not need to call it.
- You can utilize basic JavaScript methods like Math functions and JSON methods.
- You can also use Helper methods like HTTP request methods, Vtiger’s REST API or Webservice methods, and log methods for debugging.
- Certain JavaScript methods like setTimeout, setInterval, exec, and eval are restricted due to potential security risks or delays in execution.
- Importing external modules using require or import is restricted for security reasons.
- You cannot define additional functions but can use arrow functions as sub-functions.
Limitations
Following are the limitation for writing server scripts:- Code must be within the main() method; anything outside will not be executed.
- Server script execution has a limit of 15 sec and 32 MB of memory.
- Hourly server jobs can run for up to 90 sec with 128 MB of memory.
- Other server jobs can run for up to 4 mins with 128 MB of memory.
- Scheduled workflows or processes cannot use server scripts.
- Daily execution limits apply to server scripts and jobs. If exceeded, they run the next day or are skipped.
- Avoid using JavaScript functions like require, import, eval, setTimeout, and setInterval.
- Use await instead of .then() to handle promises from request and webservice methods.
- Use try-catch to handle errors from request and webservice methods.
- HTTP requests are only allowed for secure websites (https) with valid SSL certificates.
- Direct IPs, localhost, and Vtiger domains are not allowed for HTTP requests, except the CRM instance URL where the script is invoked.
Was this FAQ helpful?
0
out of
0
found this helpful.
Comments 0
Be the first to comment