New Request properties - Reference to requested role

Hi,

is it possible to reference the parameter on the requested product from the new request property?

I have value written on the Description on the UNSGroupB table and I want to write it to the request property as fixed value.

I have the problem at the beginning of the script on how to find out about requested product. I can't seem to find the script to retrieve the data from the request.

Parents
  • Found the solution myself.

    Here is the code you can put in the valuation script of request property.

    Dim objKey = TryCast(ParameterSet, IDialogParameterSet).UsedBy
    Dim request As IEntity = Nothing
    If objKey.Tablename = "ShoppingCartItem" AndAlso Connection.Session.Source().TryGet(objKey, request) Then
        Dim product As String = request.GetValue("UID_ITShopOrg").String
        Dim gr = ""
        Connection.Session.Source.TryGetSingleValue("UNSGroupB", "Description", "UID_AccProduct IN (SELECT UID_AccProduct FROM ITShopOrg WHERE UID_ITShopOrg = '" & product & "')", gr)
        Value = gr
    End If
    

Reply
  • Found the solution myself.

    Here is the code you can put in the valuation script of request property.

    Dim objKey = TryCast(ParameterSet, IDialogParameterSet).UsedBy
    Dim request As IEntity = Nothing
    If objKey.Tablename = "ShoppingCartItem" AndAlso Connection.Session.Source().TryGet(objKey, request) Then
        Dim product As String = request.GetValue("UID_ITShopOrg").String
        Dim gr = ""
        Connection.Session.Source.TryGetSingleValue("UNSGroupB", "Description", "UID_AccProduct IN (SELECT UID_AccProduct FROM ITShopOrg WHERE UID_ITShopOrg = '" & product & "')", gr)
        Value = gr
    End If
    

Children
No Data