How to reset workflow that is not in global scope

Vishnu priya2
Tera Contributor

Hi All,

I'm developing a scoped application Request form.I need to have a reset button which will cancel the workflow and restart from the new state.But I'm getting an error in the script which is given in the below snapshot.Kindly help to sought this out.

 

Vishnupriya2_0-1690216069616.png

 

 

Vishnupriya2_1-1690216200897.png

 

Thanks,

Vishnu Priya V 

1 REPLY 1

Sandeep Rajput
Tera Patron
Tera Patron

@Vishnu priya2 Since you are developing in a scoped application and trying to access a script include which is in the global scope, hence you will have to use a global qualifier before using script include name.

 

online number 15 new Workflow().deleteWorkflow(current); should be replaced with 

new global.Workflow().deleteWorkflow(current);

 Similarly, script include calls should have global qualifier prefixed on line number 26, 31, 32 and 35.

 

Hope this helps.