Approval configuration in Problem module

Vijaykumar K
Tera Contributor

Hi All,

 

I have a requirement like, need to configure approvals for Problem ticket. When ever ticket moved to review state(custom state)  approval should trigger to assignment group of ticket and one more quality group.. how can we achieve this ? Does it need to disable state model? Workflow or any other approaches available?

 

Thanks in advance 

7 REPLIES 7

Uncle Rob
Kilo Patron

I handle all approvals in either workflow or flow designer.  What have you tried?

Anshu_Anand_
Kilo Sage
Kilo Sage

Use a before BR On state change.

once the state changes to review state, create a approval request and assigned to concerned groups.

something like this .

(function executeRule(current, previous /*null when async*/) {

	// Add your code here
	var gr = new GlideRecord("sysapproval_approver");
	gr.initialize();
	gr.sysapproval = current.sys_id;
	gr.approver = current.assigned_to;
	gr.state='requested';
	gr.insert();

})(current, previous);

 

I tried in my PDI and it works .

Anshu_Anand__0-1671279284678.png

 

Approval request

Anshu_Anand__1-1671279371554.png

 

 

You also add multiple approvals if you like via BR.

so two insert record. one of group and 1 for assigned_to.

 

If its helpful, please mark answer as correct

 

Regards,
Anshu

reshmapatil
Tera Guru

Hi @Vijaykumar K ,

 

Best to use Flow on the Problem table(no code and easy to maintain):

reshmapatil_0-1671279845751.png

reshmapatil_1-1671279984327.png

 

 

Regards,

Reshma

**Please mark my answer correct or helpful based on the impact**

Hi @reshmapatil I tired with flow designer. but approvals are not triggering as expected. I am sharing snaps of flows which I configured, pls check, what I'm doing wrong here?

1. trigger condition

VijaykumarK_0-1671297952797.png

 

2.  Action to ask for approval (assignment group)

 

VijaykumarK_1-1671298032804.png

 

3. flow logic is if approved, move state to resolved

VijaykumarK_2-1671298191080.png

 

4. if Rejects (else), move state to RCA

 

VijaykumarK_3-1671298271309.png