Expand my Community achievements bar.

SOLVED

Function to get the Info From External Accounts

Avatar

Level 4

Hi

I am using Adobe Campaign Classic v6.7. I want to get some info from External Accounts using a function. Is there any function which is similat to getOption() function , which is used to get the info from Options.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Rahul,

You should use this to get the info.

//pass externel id to get the object info.

var extAccount = nms.extAccount.load(String(1234));

logInfo(extAccount.server);

Regards,

Amit

View solution in original post

7 Replies

Avatar

Correct answer by
Level 10

Hi Rahul,

You should use this to get the info.

//pass externel id to get the object info.

var extAccount = nms.extAccount.load(String(1234));

logInfo(extAccount.server);

Regards,

Amit

Avatar

Level 4

HI Amit,

I am trying to the AWS Secret Key of an S3 Account. The value that I am getting is encrypted. Is there any other way to get the Secret Key

Thanks and Regards,

Ganesh

Avatar

Level 10

Hi Ganesh,

you can use decryptString/decryptPassword to get the key.

Read:

decryptString

The decryptString function is deprecated. Refer to the Deprecated and Removed Features article.

For new customers, this function is now only used to decrypt the recipient's crypted ID in landing pages. To decrypt passwords stored in an external account, use the new decryptPassword function.

For existing customers, the behavior of this function is not changed but we recommend that you use decryptPassword instead of decryptString. The XtkSecurity_Unsafe_DecryptString compatibility option is added by the postupgrade and activated by default, allowing you to keep using the function. If you want to deactivate decryptString, deactivate the option.

decryptPassword

The decryptPassword function has been added. It allows you to decrypt a password stored in an external account.

Avatar

Community Advisor

Hi @Amit_Kumar,

Is there is any way to get the details by using internal Name not using Primary key?

Avatar

Level 10

use something like this:

var query = xtk.queryDef.create(

        <queryDef schema="nms:extAccount" operation="get">

          <select>

            <node expr="@account"/>

             <node expr="@server"/>

          </select>

          <where>

            <condition boolOperator="AND" expr="@active = 1"/>

            <condition boolOperator="AND" expr={"@name = '" + extAccountInternalName + "'"}/>

          </where>

        </queryDef>

      ); var account = query.ExecuteQuery();

Avatar

Community Advisor

Yeah, I tried that only. It's working fine.

I was curious if we have any direct function like load () .

Thanks Amit for your help.

Avatar

Level 10

Hi Kapscool, no it doesn't exist OOTB but you can create your custom in your library.