The CreatorCon Call for Content is officially open! Get started here.

Portal request has no requested item associated with it.

robertlankford
Kilo Expert

This one is baffling me.

I created a new catalog item.   I created a workflow for it.   When I invoke the item from the Service Portal, the request workflow runs while the requested item workflow doesn't.   Looking into it, there is no requested item inside the request (nor was one created and simply not associated with the request).  

So I've been looking at things and cannot find a reason for this.   Then, I ran the request through the platform view instead of the Portal view.   And, of course, things ran well there.   So, I've got a catalog item that generates valid requests --> requested items in the platform view and generates malformed requests with no requested item in the Portal view.

Any ideas?

1 ACCEPTED SOLUTION

robertlankford
Kilo Expert

The issue was all me.   I had initially started with the idea of creating an order guide.   Then abandoned it early on for just creating a catalog item instead.   I never updated the code that generated the links.   So, I was still calling:



https://dev.service-now.com/sp?id=sc_cat_item_guide&sys_id=57213a7e0f0cdb40b04f419ce1050e9c



when I should have been calling:



https://dev.service-now.com/sp?id=sc_cat_item&sys_id=57213a7e0f0cdb40b04f419ce1050e9c




View solution in original post

3 REPLIES 3

mohan91
Mega Expert

Hi   Robert,



Can you please make sure whether all the variables are getting displayed in both platform as well as portal view. Also, make sure WF start condition has been qualified in both the views. Please share screenshot of WF and requests from both views for more information.


I purposefully was not displaying all the variables on the form.   I'm not sure what difference that would make, but I disabled the 'setVisible' statements that were hiding certain items on the form.



Here is what the request looks like in the platform view:



catalog-item_platform.png



Here it is in the portal view:


catalog-item_portal.png



Here is the workflow (runs on platform, never get started on portal):


workflow.png



Here is the result of a sample submission via the platform view:


request_platform.png


As you can see, a requested item was created and processed.



Now here's the same scenario carried out from the platform:



request_portal_1.png


Notice that only the request's workflow ran and added items to the activity stream.   Here's what I see when I click the Employee Self-Service view:


request_portal_2.png


Clicking Requested Items yields:


request_portal_3.png



Some thoughts about this request.   I'm passing in parameters to it via the URL.   Namely:


  1. Operation - Is the employee trying to verify, deny, or claim ownership of a computer?
  2. System ID - Which computer is the employee trying to verify or deny?


So, the url for a verify operation might look like:


.../sp?id=sc_cat_item_guide&sys_id=1234&user_op=verify&target_sys_id=1234



In both cases (portal and platform), the onload catalog client script successfully parses the url parameters and updates the form's variables accordingly.


robertlankford
Kilo Expert

The issue was all me.   I had initially started with the idea of creating an order guide.   Then abandoned it early on for just creating a catalog item instead.   I never updated the code that generated the links.   So, I was still calling:



https://dev.service-now.com/sp?id=sc_cat_item_guide&sys_id=57213a7e0f0cdb40b04f419ce1050e9c



when I should have been calling:



https://dev.service-now.com/sp?id=sc_cat_item&sys_id=57213a7e0f0cdb40b04f419ce1050e9c