For the complete documentation index, see llms.txt. This page is also available as Markdown.

Set up approvals for planned records

Register the approval consumer so YouDesign Command can ask for approval before a planned record becomes real.

You need the admin role on the instance.

In YouDesign Command, a planner can turn a planned record into a real one. A Command administrator can require approval for that, per record type. Approval needs one record on the instance first: the approval consumer that ties these requests to the code that applies them. Do this once per instance, after installing or upgrading to a release that includes it.

Without it, every record type set to Approval falls back to the planner's own create rights, and Global Settings > General says Approvals for this are not set up on this instance.

Before you start

  • The release that adds Make current is installed. It includes the Script Includes FSRMaterializeApprovalExecutor and FSRMaterializeRequest.

Steps

  1. In ServiceNow, open Scripts - Background (filter navigator: Scripts - Background).

  2. In in scope, choose YouDesign Command (x_inpgh_upmx).

  3. Paste this script and click Run script:

    new x_inpgh_upmx.YCMApproval().registerConsumer(
        'fsr_materialize',
        'Make a Future State plan current',
        'FSRMaterializeApprovalExecutor',
        JSON.stringify([{ key: 'future_of_class', label: 'Class, as listed in the setting', type: 'string' }])
    );

Running it again is safe: it updates the existing record and leaves it active.

Check it worked

  1. Open the table x_inpgh_upmx_approval_consumer.list and find the row with Token fsr_materialize. It is Active, and its Callback is FSRMaterializeApprovalExecutor.

  2. In the portal, open Global Settings > Approvals and click Add Policy. Make a Future State plan current is offered as a Consumer.

Reference

Name
Technical name
Purpose

Approval consumer

fsr_materialize in x_inpgh_upmx_approval_consumer

Ties approval requests for planned records to the code that applies them

Approval executor

FSRMaterializeApprovalExecutor

Makes the plan real when its request is approved, and describes the request to approvers

Setting

fsr.materialize_entitlement in x_inpgh_upmx_global_settings

Per record type: create_rights or approval, with * as the default. Edited in Global Settings > General

Scope attribute

future_of_class

The record type a request is scoped by: the one listed in the setting that decided, so a policy for a type also covers its more specific types

Last updated