Questions about GlideappWizardIntercept(path).get()

DamianoG
Tera Contributor
Hi everybody,
 
I'm trying to learn more about GlideappWizardIntercept, and where i can find any information about it in my instance. The instance says that there isn't any definition  for GlideappWizardIntercept.
 
I have a UI action that creates a new problem task. When you press the Ui action, first goes on and interceptor and then it opens a problem task with some pre-edited text, like the type of problem task.
 
var uri = action.getGlideURI();
var path = uri.getFileFromPath() + '';
path = path.substring(0, path.length - 5) + '.do';

 

uri.set('sys_id', '-1');

 

path = checkWizard(uri, path);

 

if (path)
   action.setRedirectURL(uri.toString(path));

 

action.setNoPop(true);

 

function checkWizard(uri, path) {
   var already = uri.get('WIZARD:action');
   if (already == 'follow')
   return null;
   
   var wizID = new GlideappWizardIntercept(path).get();
   if (!wizID)
      return path;
   
   uri.set('sysparm_parent', wizID);
   uri.deleteParmameter('sysparm_referring_url');
   uri.deleteMatchingParameter('sysparm_list_');
   uri.deleteMatchingParameter('sysparm_record_');
   uri.deleteParmameter('sys_is_list');
   uri.deleteParmameter('sys_is_related_list');
   uri.deleteParmameter('sys_submitted');
   uri.deleteParmameter('sysparm_checked_items');
   uri.deleteParmameter('sysparm_ref_list_query');
   uri.deleteParmameter('sysparm_current_row');
 
   uri.set('sysparm_referring_url', uri.toString());
   uri.deleteMatchingParameter('fancy.');
   uri.deleteMatchingParameter('sys_rownum');
   uri.deleteMatchingParameter('sysparm_encoded');
   uri.deleteMatchingParameter('sysparm_query_encoded');
   uri.deleteParmameter('sysparm_refer');

 

   return 'wizard_view.do';
}
 
From what i can understand, the interceptor gets selected based on what gets set in  "uri.set('sysparm_parent', wizID);" My customer need to have another one similar, but with different choices.
 
wizID is given by GlideappWizardIntercept(path).get();  This method returns a sys id, and than is set with uri.set('sysparm_parent', wizID);
 
As i said, I wanted to see the definiton to understand how to add a new sys id for my UI action, but I can't search for that definition. GlideappWizardIntercept is not Bold like the other methods, and If I try to search for the definition of GlideappWizardIntercept, my instance says that there isn0t any definition about that.
 
Can somebody give me a hand, please?
 
Thanks in advance.
1 ACCEPTED SOLUTION

I'm not entirely sure what you're asking. If the Root Cause Analysis answer is not useful, you can set it to Inactive:

 

SheldonSwift_0-1737912811653.png

 

If you need to keep the OOB Problem Task interceptor and want to create a new one, you can try to specify the sys_id of the wizard you want to use. Just replace path with the sys_id of your interceptor like this:

 

   var wizID = new GlideappWizardIntercept('29f12894534823004247ddeeff7b1222').get();

 

View solution in original post

6 REPLIES 6

I'm not entirely sure what you're asking. If the Root Cause Analysis answer is not useful, you can set it to Inactive:

 

SheldonSwift_0-1737912811653.png

 

If you need to keep the OOB Problem Task interceptor and want to create a new one, you can try to specify the sys_id of the wizard you want to use. Just replace path with the sys_id of your interceptor like this:

 

   var wizID = new GlideappWizardIntercept('29f12894534823004247ddeeff7b1222').get();

 

It's a bit more complicated.

 

Basically they need to let users open an RCA task only when the parent problem is in asses or root cause analysis state.


I didn't find a way to hide that option while on those states, so my colleague suggested me to create a new button "new", and then show only one of them using the condition field.

So for the users there would be only one button, with a different behaviour

 

I've simplified my question here to only the technical part (kinda...)

 

Meanwhile I've checked the solution wou've proposed, and the system is working.

The only problem now is that It redirects right into the new record instead of the interceptor with the single question, but I think that is a good compromise.

If you have only one choice, It's useless to leave the users see the interceptor window

 

Also It keeps the type of the task and also it fills the problem field, so there's the link between problem task and problem.