AMPscript lookuprows error on synchronized data extension

2.5k views Asked by At

My users will be using Distributed Marketing quick send from the standard Contact record. I need to pull User data into a content template for the email signature. Right now I'm just trying to get the phone number from the user sending the email.

Can't seem to figure out if there is some kind of additional access that needs to be granted or if I am missing something else.

User_Salesforce_1 is my synchronized User object DE living in a child BU. Email is the standard Email field on User I'm using to match @sendFromEmail on the main QS Journey DE.

I have multi-org connected.

%%[

var @rows, @row, @senderemail, @phone

set @senderemail = AttributeValue("sendFromEmail")
set @rows = LookupRows("User_Salesforce_1","Email",@sendFromEmail)
set @row = Row(@rows, 1)
set @phone = Field(@row,"Phone")

]%%

<p>
%%=(@phone)=%%
</P>

Here is the Error

The subscriber preview failed to generate. Review the details, correct all issues, and try again. The Data Extension name for a LookupRows function call is invalid. A Data Extension of this name does not exist. Data Extension Name: User_Salesforce_1 Function Call: LookupRows("User_Salesforce_1","Email",@sendFromEmail) Parameter Name: DataExtensionName Parameter Ordinal: 1

1

There are 1 answers

0
Scott T. On

You many need to reach out to support and ask them to enable the AMPSCRIPT_ENT_LEVEL_DE_SHARING business rule in your account. This setting is not available via the standard Admin/Setup UI within Marketing Cloud.

This business rule was introduced a few years ago and impacts the way data can be pulled from Synchronized DE's within an instance.

Also, as others have mentioned, you will likely need to use the ENT. prefix when referencing the DE in the lookup.