Failure Rerun

Function Failure and Rerun

Functions in Zoho CRM enable users to write their own logic using Deluge and Java to perform customized actions. For more details, refer to Serverless architecture - An Overview.

Check for Failures

However, there are some times when the functions do not get executed. Those failures occur randomly or could occur because of the following reasons.

  • Bug(s) in your function.

  • Error due to the parameters that you have passed to the function.

  • Server issues like "Internal Server Error".

  • Function took too long to execute.

  • Error due to your third-party API.

You can use the “Failures” tab on the Functions page in the product to check for the list of functions that weren't executed. This tab lets you figure out where it went wrong and also provides you the option to rerun the function.

How to use Failure Rerun?

Following are the situations when your function may fail and what you can do before rerunning the function.

Reason for FailureHandling
The request payload was erroneousEnsure to pass accurate data to the function. If the data is incorrect, the function will manipulate only this data and rerunning will always the cause the function to fail.
Error in code logicEnsure to test your function integration with test data until you receive the desired output. If the logic that your function performs is incorrect, rerunning the function will always fail.
Error due to your third-party APIEnsure that the third-party APIs that your function may invoke are working properly. Rerunning function when there is an error in the third-party API will continue to fail until the issue is fixed.
  • The function failed due to an error in the code logic and you want to rerun the function after fixing it.

  • Your function took too long to execute and you want to rerun it.

  • The function failed due to server issues.

Rerun a failure

  1. Go to Setup > Developer Space > Functions > Failures.

  2. Select the function that wasn't executed.

  3. Click Rerun. Your function will be executed once again.

Rerun multiple failures

In case you have multiple functions that did not execute successfully, you can rerun all of them simultaneously. However, the system schedules the rerun to take place one at a time.

To rerun multiple functions,

  1. Go to Setup > Developer Space > Functions > Failures.

  2. Use the checkboxes to select the functions that are to be rerun.

  3. Click Rerun. A pop up notifies you of the functions that are already scheduled to be rerun. You can choose to schedule the remaining failures.

  4. The system notifies you after all the scheduled failures complete rerun.

Note:
  • When you rerun a function, it takes only the old values for the arguments. The old values are the ones that were present in the record(s) when you first ran the function.

  • When you rerun the function with the old values, there is a possibility of duplicate actions. This could be due to the record being manipulated based on another automation rule between the time the original function failed and the time you reran the function. Therefore, it is recommended that you rerun the function with caution.

  • The failed functions are listed under the Failures tab for a maximum of 30 days.

  • Functions associated to "Related Lists" and "Validation Rules" (CRM Fundamentals) that failed will not be listed under the Failures tab.

  • Rerunning a failed function once reduces one call from the total calls available for your edition of CRM.

  • When the function you rerun fails again, the failures tab will not have multiple entries for the same failure. Only the time and reason for failure is updated.

  • When the function related to an entity fails multiple times, you must resolve the issue in your function code first, and rerun the latest failure alone. Rerunning all other failures may lead to duplicate data.

  • You can select a maximum of 100 function failures to be rerun at a time.

  • After all the scheduled reruns are executed, the system notifies you of completion.

Filter failures

Functions in the list view can be filter based on the location from where they are executed, and the language they are written in.

To filter the functions,

  1. Go to Setup > Developer Space > Functions > Failures.

  2. Click the All drop-down to sort the failure based on the place of execution, and the Languages drop-down to filter based on the language.

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohocrm.com