Can we add both Flow and Workflow in a Catalog Item?

sattar3
Tera Contributor

Hello All,

 

Is it possible to add both Flow and Workflow in a Catalog Item? both are for different scenarios.

As mentioned in the help text only one engine can be selected?

sattar3_0-1721970092020.png

 

Please let me know if anybody work on this kind of requirement in past and what will be procedure if we can add both.

 

@Community Alums  @Ankur Bawiskar 

 

Thanks,

Sattar

1 ACCEPTED SOLUTION

Mark Roethof
Tera Patron
Tera Patron

@sattar3 

Is it possible to trigger both Flow and Workflow... YES IT IS

(just not best practice I guess haha)

 

MarkRoethof_0-1722000111980.png

 

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

View solution in original post

9 REPLIES 9

sattar3
Tera Contributor

@Dr Atul G- LNG @SK Chand Basha @Harish Bainsla @OlaN 

Thanks for your reply.

 

I created a flow to cancel the selected delegations in a list type variable(your_delegate) for a catalog item.

sattar3_0-1721974016252.png

 

I created a Set Flow Variable reference to sys_user_delegate table.

Script in set flow variable:

var delegateSysIds = [];
var gr = new GlideRecord("sys_user_delegate");
// fd_data.1_get_catalog_variables.your_delegate is an array of sys_ids
var selectedDelegates = fd_data._1_get_catalog_variables.your_delegate;
for (var i = 0; i < selectedDelegates.length; i++) {
    gr.addQuery('sys_id', selectedDelegates[i]);
    gr.query();
    if (gr.next()) {
        delegateSysIds.push(gr.sys_id.toString());
    }
}
// Return the list of sys_ids
return delegateSysIds;
sattar3_3-1721974256503.png

and in the update record i'm calling the set flow variable, it is returning sys_ids but not updating it.

getting the below error but for one record  its getting working not working if we selected multiple delegates to cancel.

sattar3_2-1721974162165.png

we want to set the end date of the selected delegates as current time.

 

How we can do this? can someone please help me this?

 

Thanks,

Sattar

Hi @sattar3 

 

Please post this as a separate question and close this thread by accepting the right answer. [ I am not a dev , so not able to answer this]

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

Hmmm interesting question, never tried! Never tried just because I don't have a use case for this, and out-of-the-box only one is accepted because of Client Side validation. Though is that a real limitation...

 

I'm going to test! Give me 5-minutes 🤣

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Mark Roethof
Tera Patron
Tera Patron

@sattar3 

Is it possible to trigger both Flow and Workflow... YES IT IS

(just not best practice I guess haha)

 

MarkRoethof_0-1722000111980.png

 

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

😂😂