Disable REQ Approval for Technical Catalog

Nisha30
Kilo Sage

Hello Experts,

How do I disable the REQUEST level Approval for only Technical Catalog. 

We have RITM approval and thats what we want only .

How to disable REQ Approval  for only Technical Catalogs?

 

Thanks

 

1 ACCEPTED SOLUTION

@Nisha30 

like this

var ritmSysId = current.sysapproval;
var ritmRec = new GlideRecord('sc_req_item');
ritmRec.addQuery('sys_id', ritmSysId);
ritmRec.addEncodedQuery('cat_item.sc_catalogsLIKE742ce428d7211100f2d224837e61036d'); // the sysId is for Technical Catalog
ritmRec.query();
if (ritmRec.hasNext) {
    current.state = 'approved';
}

AnkurBawiskar_0-1743431644507.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

25 REPLIES 25

Hi @Shivalika 

Yes Thanks I am trying to do the same stopping it to run if it is technical catalog it gives me error .

Nisha30_0-1743510887180.png

 

Nisha30_1-1743510948147.pngNisha30_2-1743511357281.png

 

Thanks

Ankur Bawiskar
Tera Patron
Tera Patron

@Nisha30 

Request level approval comes from this OOB Workflow on sc_request "Service Catalog Request"

REQ is auto approved if the item price is <= $1000

I won't recommend updating that OOB Workflow

1 way

1) keep price of your catalog items under Technical Catalog under $1000 and REQ will be auto approved

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

HI @Ankur Bawiskar  but we do not have any price related logic or stuff for the Technical catalog. Thanks

@Nisha30 

items under Technical catalog are waiting for REQ approval?

If yes then did you check the price of that catalog item

I already informed if the price is less than $1000 then it's auto approved.

You can also have before insert business rule on sysapproval_approver table

Condition: current.source_table == 'sc_request'

Script:

// check if the REQ has any RITM for which catalog item belongs to Technical catalog

// if yes then set this line

current.state = 'approved';

Also you can update the OOB workflow this condition

AnkurBawiskar_0-1742995537724.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar 

thanks the business rule idea also seems fine.

I need to stop workflow only when Technical catalog is used. since we have flow designer in those items. But for rest of the other catalogs (other than Technical catalog) there is workflow editor.

Thanks