Can someone share an example of using a!scsfield functions in a rule?

As we know, the a!scsField function can only be called within certain objects. Can someone share an example of using a!scsfield functions in a rule to retrieve the 3rd party credentials? 

  Discussion posts and replies are publicly visible

Parents
  • Hi,

    a!scfield function is used for fetching credentials stored in admin console/third-party-credentials. for example

    if you have stored crednitials for a third party system and want to retrieve it and pass to that system while making  a service call then you can use this function.

    First parameter would be name which you have made an entry on third party credntials console, second parameter would be the field name which you want to retrieve. usually first parameter would be unique key which can be as per your standard and the second parameter would be field again unique but value would be the password which you need to sent to authenticate the system.

  • I did exactly what you stated in your email but the return value of a!scfield function is not the password. Plz see my expression rule and its test result below. I heard the reason is that the a!scsField function can only be called within certain objects. Do you know what are the objects?

    /*My expression rule*/

    a!localVariables(
      local!pwd: a!scsField(cons!LBS_ACCT_NUM_KEY_NAME,"pwd",true),
      if(isnull(local!pwd),"password is null","LBS Acct Number Generator API password=" & local!pwd)
      )

    ====================

    Test OutputHide section contents

    Time   < 1 ms

    Type   Text

    Value  

    Formatted
    Raw
    Expression

    "LBS Acct Number Generator API password=[externalSystemKey=lbs.acct.number.generator.api, fieldKey=pwd, usePerUser=true]"

  • The scsField function is mostly used in plugins and legacy functions. It can't be used in a normal expression - it only works if the function you use is explicitly expecting scsField as the data type.

    Also, I don't believe you can use the value of your password in an expression. This could potentially compromise the security of your stored passwords if the plaintext could be used in expressions.

    Can you use connected systems instead of passwords in the Secure Credential Store? What system are you integrating with? 

Reply
  • The scsField function is mostly used in plugins and legacy functions. It can't be used in a normal expression - it only works if the function you use is explicitly expecting scsField as the data type.

    Also, I don't believe you can use the value of your password in an expression. This could potentially compromise the security of your stored passwords if the plaintext could be used in expressions.

    Can you use connected systems instead of passwords in the Secure Credential Store? What system are you integrating with? 

Children