Skip to content

Generate link to specified request offering or to Generic Request

Generate link to specified request offering or to Generic Request published on No Comments on Generate link to specified request offering or to Generic Request

This article describe how to generate link to specified request offering or to Generic Request on the Self-Service Portal. This can be helpful in email massages or on the custom portals\external systems. To do that you should complete two steps: get IDs of the Service Request and Request offering and generate link.

Link to specified request offering look like this:

http://server/SMPortal/SitePages/Request%20Offering.aspx?RequestId=5ba8a90d-02a6-7f4e-3590-8b2c93892ad6&ServiceId=ee45b320-280d-3f4f-c3e2-d2e07c25f933

As you can see you must know the ID of the Service Request and Request Offering.

First of all you must install SMLets if you haven’t do if before. Now you can find service request by using Get-SCSMServiceRequest and request offering by Get-SCSMRequestOffering.

In my test environment I have a service request with title “Test SO”:
image
and request offering with title “Test RO”:
image

With Get-SCSMServiceRequest and Get-SCSMRequestOffering you not need to know internal name of the SO and RO and can use –DisplayName parameter: if you created your SO and RO from console then Display Name is always equal to Title.

In my case I got SO and RO objects by two queries:

# Service Request
Get-SCSMServiceOffering -DisplayName "Test SO"

# Request Offering
Get-SCSMRequestOffering -DisplayName "Test RO"

But this snippet doesn’t allow get the Id of the SO and RO:
image

Both command returns the Type Projection object. So to get IDs of the object itself you should get Object property add call Get_Id() method for it:

# Service Request
(Get-SCSMServiceOffering -DisplayName "Test SO").Object.Get_Id()

# Request Offering
(Get-SCSMRequestOffering -DisplayName "Test RO").Object.Get_Id()

as result:
image

Now you can copy IDs to url:
http://server/SMPortal/SitePages/Request%20Offering.aspx?RequestId=fb12a65f-278e-9bff-e8f4-16e95c1c961d&ServiceId=c81999db-9357-04a3-bae3-20d1e769296d

Generic Request

To open Generic Request just remove all parameters after Request%20Offering.aspx:

http://server/SMPortal/SitePages/Request%20Offering.aspx

Share

%d bloggers like this: