Software request triggers the two workflows, how shall I trigger only my workflowfff

Raju Singh1
Tera Expert

Hi Experts,

I have designed a workflow for ordering Software. The process is that it opens a request item then an RITM.

I am facing a problem that whenever I request for a software, it opens two workflows for a service Request, one is oob workflow Service Catalog Request, and my designed workflow SC-Software Request wf. As a result it automatically sets the Approval value as Approved due to the oob process Runs.

I am unable to separate it. I want only my designed SC-Software Request wf to Run. The only method is to quote a price of the software I think which If I increase more than $1000, then it will not set the value automatically to be approved. Is there a way I only want my workflow to Run for this Request.

Capture1.JPG

Capture2.JPG

Capture3.JPG

Regards,

Raju Singh

1 ACCEPTED SOLUTION

Use below



var title = '';


var desc = '';


var ritem = new GlideRecord('sc_req_item');


ritem.addQuery('request',current.sys_id);


ritem.query();



while (ritem.next())


{


        if (title=='')


        {


                  title = ritem.cat_item.getDisplayValue();


                  desc = ritem.cat_item.category.getDisplayValue();


        }


        else


                  title = title + ','+ritem.cat_item.getDisplayValue();


                  desc =   desc+','+ritem.cat_item.category.getDisplayValue();


}



current.short_description = title;


current.description = desc;



Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

23 REPLIES 23

Added one more line to correct it. Business rule on request on insert and on update



var title = '';


var ritem = new GlideRecord('sc_req_item');


ritem.addQuery('request',current.sys_id);


ritem.query();



while (ritem.next())


{


        if (title=='')


        {


                  title = ritem.cat_item.getDisplayValue();


        }


        else


                  title = title + ','+ritem.cat_item.getDisplayValue();


}



current.short_description = title;



Please mark this response as correct or helpful if it assisted you with your question.

No, Sanjiv



Still it doesnt work.. The short description doesnt get populated yet even after putting this code.


Worked for me



find_real_file.png



find_real_file.png



find_real_file.png



Please mark this response as correct or helpful if it assisted you with your question.

I am not sure, when I put the same query... Why do I get the short description as 'title'



I do not get the catalog item name at all...



Here is the screen shot of the code which is exactly your code.



Capture7.JPG



Here is the result in the Service Request



Capture8.JPG



can I get the name of the category like the the service catalog category is 'Software Request'


Correct line 19



current.short_description = title;



instead of current.short_description = 'title'; ->this is wrong



Please mark this response as correct or helpful if it assisted you with your question.