Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

How to show recurring price on approval form of service portal

pallavisang
Tera Contributor

I want to show recurring price on approval form 

2 REPLIES 2

AnkaRaoB
Giga Guru

Hi @pallavisang ,

 

Service Portal approval page does not show price or recurring price by default. This is because approvals are rendered using a generic approval widget, not the catalog item form.

To display Recurring Price, you need to expose it explicitly.

Understand where the data lives (important)

For catalog approvals:

Table: sc_req_item (RITM)

Fields:

price → One-time price

recurring_price → Recurring cost

recurring_frequency → Monthly / Yearly (if used)

Approvals reference the RITM through:

sysapproval_approver → sysapproval → sc_req_item

Recommended) \: Update the Approval Widget (Service Portal)

Step 1: Identify the widget

Go to:

Service Portal → Widgets

Find the widget used on the approval page, typically:

Approval Record

SC Approval

or a cloned/custom approval widget

 Best practice: Clone the widget before modifying.

Step 2: Update the Server Script

Add logic to fetch the recurring price from the RITM:

if (data.sysapproval) {

    var ritm = new GlideRecord('sc_req_item');

    if (ritm.get(data.sysapproval)) {

        data.price = ritm.price.getDisplayValue();

        data.recurring_price = ritm.recurring_price.getDisplayValue();

        data.recurring_frequency = ritm.recurring_frequency.getDisplayValue();

    }

}

Step 3: Update the HTML Template

Add fields to display the recurring price:

<div class="m-t-sm" ng-if="data.recurring_price">

  <strong>Recurring Price:</strong>

  {{::data.recurring_price}}

  <span ng-if="data.recurring_frequency">

    ({{::data.recurring_frequency}})

  </span>

</div>

 

This shows recurring cost clearly to approvers

 Works for catalog item approvals

If this helps you then mark it as helpful and accept as solution.

SumanthDosapati
Mega Sage

@pallavisang 

Which page are you referring to when you say approval form in portal? Is it in ToDos list?

Can you share a screenshot of the page

 

Regards,
Sumanth