Function to get the Info From External Accounts | Community
Skip to main content
Level 3
Sep 25, 2018 9:11 AM UTC
Solved

Function to get the Info From External Accounts

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Amit_Kumar
Amit_KumarAccepted solution
Level 10
Sep 25, 2018 3:10 PM UTC

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

7 replies

Amit_Kumar
Level 10
Aug 21, 2019 8:46 AM UTC

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

Translate
kapilKochar
Level 6
Aug 21, 2019 5:24 AM UTC

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.

Translate
Amit_Kumar
Level 10
Aug 20, 2019 10:01 AM UTC

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();

Translate
kapilKochar
Level 6
Aug 16, 2019 4:25 AM UTC

Hi @Amit_Kumar,

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

Translate
Amit_Kumar
Level 10
Sep 26, 2018 8:32 AM UTC

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.

Translate
Level 3
Sep 26, 2018 3:11 AM UTC

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

Translate
Amit_Kumar
Amit_KumarAccepted solution
Level 10
Sep 25, 2018 3:10 PM UTC

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

Translate