How do you find the RecID on a specific Service Requests for use in XSLT?

Version 3

    Details

    When building the XML for a ServiceReq, the SvcReqTmplLink and SvcSubscLink_RecID fields need to be filled out, how do you find that information?


    Resolution

    A SQL query is the best way to pull the information.

    The 'Export to Excel' quickaction can also be used to pull the desired information.
    Based on the example:

    <xsl:variable name="email" select="substring-after($Body,'Email$')"/>

    <!-- Fill in the necessary fields and related business objects for a domain password reset -->

    <FieldList>

    <Field Name="SvcReqTmplLink" Type="System.String">Domain Password Reset</Field>

    <!-- Replace this subscription RecID with the valid one for your system: -->

    <Field Name="SvcReqSubscLink_RecID"Type="System.String">BDF2D75B420C438E9468BC613E6AB369</Field>

     

     

    SQL QUERY:
    Fulfillment Workflow ID is the ID required to launch the fulfillment workflow.

    SELECT

        C.Name as [Offering Name],

    C.Status as [Offering Status],

        M.RecID as [Subscription ID],

    T.TargetID as [Fullfillment Workflow ID]

    FROM

        ServiceReqTemplate C

        OUTER APPLY

        (

            SELECT TOP 1 *

            FROM ServiceReqSubscription M

            WHERE M.SvcReqTmplLink_RecID = C.Recid

    AND M.RecID is not null

    ORDER BY M.CreatedDateTime DESC

        ) m

    OUTER APPLY

    (

    select TOP 1 * from [dbo].[FusionLink] where RelationshipName = 'ServiceReqTemplateAssociatedServiceReqFulfillmentP' and SourceID = (select TOP 1 RecID from ServiceReqTemplate where ServiceReqTemplate.Name = C.Name)

    ) t

    ORDER BY

        C.Name ASC

     

    Export to Excel:
    TemplateLink is kicking back the RecID, which should still work, but the examples are pushing the resolved value, which is the name of the offering, like what you see with the SQL query.