Home > PowerShell, SCSM > #SCSM: Set Service Request Title from Related Request Offering

#SCSM: Set Service Request Title from Related Request Offering

One of request that I got through my SCSM project is to create custom workflow to Set Service Request Title from Related Request Offering

The script use SMLets commands that you can download from http://smlets.codeplex.com/

You can configure workflow using that script to trigger on new Service Request creation to copy title from related Request Offering

Import-Module SMLets  
$ServiceRequest = Get-SCSMObject -Class (Get-SCSMClass -Name System.WorkItem.ServiceRequest$) -Filter "ID -eq $ServiceRequestID"  
$GetRelatedRequestOffering = (Get-SCSMRelationshipObject -BySource $ServiceRequest | ?{$_.RelationshipID -eq "2730587f-3d88-a4e4-42d8-08cf94535a6e"}).TargetObject.DisplayName  
$GetServiceRequestTitle = $ServiceRequest.Title  $ServiceRequest | Set-SCSMObject -Property Title -Value "$GetRelatedRequestOffering"
Advertisements
Categories: PowerShell, SCSM Tags:
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: