My Script Reads the Old Value of a Custom Field


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


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 page.

Filter by label

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