$customHeader
Skip to end of banner
Go to start of banner

My Script Reads the Old Value of a Custom Field

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Problem

When running a SIL script, the value of a Custom Field is accessed incorrectly and reads the old value instead of the current one.

Solution

Whenever changes are made to a custom field, the issue must be reindexed before the updates are accessible. This is the same whether the custom field is updated via script or by manual input.

  • Make sure that any SIL Post Functions are the absolute last in the Post Function stack. For more information, see this documentation on customizing workflows.

  • Reindex the issue before accessing the custom field using admReindexIssue(). For example:

    admReindexIssue(key);
    string customFieldValue = textField;

Note that reindexing the issue before accessing custom field values is usually unnecessary as reindexing should run each time a SIL script is run. Using admReindexIssue() is a great way to troubleshoot code, but may be a sign that something is not configured correctly. If the issue persists, please create a support ticket here.

Additional Help

Need help implementing this script? Talk to me directly to me by clicking on the bot on bottom of our anovaapps.com page.

Filter by label

There are no items with the selected labels at this time.

  • No labels