8 Replies Latest reply on Jun 6, 2017 3:11 PM by WillSchultze

    Creating a service request with a template from workflow

    stapletj@tbh.net Apprentice

      Is there documentation available for creating an automated service request?

      I can create it, and apply the template, but I'd like to fill out a field in the template during the task.

       

      Thanks,

       

      -Jay.

        • 1. Re: Creating a service request with a template from workflow
          stapletj@tbh.net Apprentice

          To clarify:

          I have a SR template called "Device Replacement". There's a Parameter called "DeviceList"

          I want to have a quick action from an incident to create a Device Replacement, and have it populate the DeviceList.

          I can read parameters with GetSRPValue(), but can I write to them?

          • 2. Re: Creating a service request with a template from workflow
            stapletj@tbh.net Apprentice

            I got it working. Here's my process: I'm using a field called "PrintSummary" that we've created in ServiceReq that isn't used in this context as a trigger.

             

            Quick Action to create Device Replacement Request from Incident:

              Child Object:

              ServiceReqAssocIncident

              Field Name, Field Value

              Status,Active

              Team,$(if nvl(Owner, "") != "" then OwnerTeam else "Service Desk")

              Owner,$(Owner)

              ProfileLink_RecID,$(ProfileLink_RecID)

              ProfileLink_Category,$(ProfileLink_Category)

              Urgency,Medium

              SvcReqTmplLink,DA580466F1054627B6DBD29A65BC5EE2

              SvcReqTmplLink_Category,ServiceReqTemplate

              SvcReqSubscLink,99A145FF34B545BBB37A69145EFE9FF7

              SvcReqSubscLink_Category,ServiceReqSubscription

              PrintSummary,Automatic Device Replacement

             

             

            Triggered action in ServiceReq BO

            Process Automatic Device Replacement Request

              On Insert

              If $(PrintSummary == "Automatic Device Replacement")

             

              Composite Object

             

              CorpOwner,InsertChildObject

              ServiceReqContainsServiceReqParam

              Display Type combo

              Parameter Link F2E21FD708BD490083A7EBF957E4C386

              Parameter Name corpowner

              Parameter Value $(Prompt("Select Corporate Owner", "CorporateOwner", _, _, true))

              ParameterDisplayValue $(GetSRPValue(RecId, "corpowner"))

              ParameterLink_Category CorporateOwner#

              ParameterPrice 0

              ParentLink $(RecId)

              ParentLink_Category ServiceReq

              Recurrent Price 0CAD

              SvcReqTmplParamLink 75C36E432A984CE3AF29F6A8171C60CF

              Price 0CAD

             

              LaptopsCheckBox,InsertChildObject

              ServiceReqContainsServiceReqParam

              Display Type checkbox

              Parameter Link F2E21FD708BD490083A7EBF957E4C386

              Parameter Name LaptopsCheckbox

              Parameter Value TRUE

              ParameterDisplayValue TRUE

              ParameterPrice 0

              ParentLink 251C0E3D77DF4816A267FC0B0DE97550

              ParentLink_Category ServiceReq

              Recurrent Price 0CAD

              SvcReqTmplParamLink E5A1C0A7265F467AADF4BB1266A0B6FE

              Price 0CAD

             

              DeviceList,InsertChildObject

              ServiceReqContainsServiceReqParam

              Display Type textarea

              Parameter Name DeviceList

              Parameter Value $(Prompt("Enter Devices to Replace"))

              ParameterDisplayValue $(GetSRPValue(RecId, "DeviceList"))

              ParameterPrice 0

              ParentLink 251C0E3D77DF4816A267FC0B0DE97550

              ParentLink_Category ServiceReq

              Recurrent Price 0CAD

              SvcReqTmplParamLink FC7B713301714C5D9F1D8DA14FEC7FB3

              Price 0CAD

             

            I'm sure there's an easier way.

            1 of 1 people found this helpful
            • 3. Re: Creating a service request with a template from workflow
              dcogny Expert

              Still have to read through it... but amazing work anyway!

               

              And thanks for posting your solution!

              • 4. Re: Creating a service request with a template from workflow
                stapletj@tbh.net Apprentice

                This method does not invoke the workflow for the template, and doesn't let me manually do it through a triggered action. Still a work in progress.

                • 5. Re: Creating a service request with a template from workflow
                  susiemiller Rookie

                  Jay, I am trying to do a similar action and need the "SvcReqSubscLink_RecId and SvcReqTmplLink.   How did you get this information?

                  • 6. Re: Creating a service request with a template from workflow
                    stapletj@tbh.net Apprentice

                    I went into SQL server manager and looked at records that used the template I wanted.

                     

                    I gave up on this - I was able to create the ServiceReq, but it wouldn't run the workflow, so it wasn't very useful. If you get it working, let me know, It's still on my "todo" list, just got kicked to the bottom in frustration (:

                    • 7. Re: Creating a service request with a template from workflow
                      susiemiller Rookie

                      Thanks Jay... This is very helpful.  I will let you know if I get this to work.

                      • 8. Re: Creating a service request with a template from workflow
                        WillSchultze Rookie

                        Been working on this same problem. Seems like a pretty basic function -- why won't the template workflow instantiate when you insert a new ServiceReq with a workflow versus doing it in UI? Maybe "unanswer" this if you can. Someone must haev a way to get this working.