I am trying to fetch data using Ampscript from Synchronized Data Extensions to show on a cloud page. Is it possible to do this? I am using lookup function to achieve but not getting data out of it.

SET @firstname = @lookup("Contact", "FirstName", "Id", @ContactID)

2 Answers 2


If this is in a child BU you need to use the ENT. prefix

Unsure why you are using an @ in front of lookup and assuming you are setting a value for @contactID

SET @firstname = lookup("ENT.Contact", "FirstName", "Id", @ContactID)

  • We are working in Multi-org environment, But still i have to use ENT to access the sync DE. is it mandatory to use ENT to access sync DE?
    – R Suri
    Commented May 14, 2019 at 14:19
  • 1
    All Sync DE are "Owned" by the EID and need the ENT. prefix
    – EazyE
    Commented May 14, 2019 at 14:21
  1. Verify the name of your Contact Synchronized DE within Marketing Cloud. Typically the name is something like Contact_Salesforce, but in some circumstances (multi-org configuration), also another suffix is added. I have not seen it called Contact yet, although this would be the object name in Salesforce.

  2. Delete the @ before the function, as EazyE said.

  3. Test your CloudPage code in an email first, to get error messages from the preview screen and debug accordingly

  4. If your CloudPage is hosted in a Child BU, you might have to do a workaround.

It is definitely correct that ENT. prefix has to be used to access the Parent BU context.

SET @firstname = lookup("ENT.nameOfYourSharedDE", "FirstName", "Id", @ContactID)

Maybe you're already set now.

In case it still doesn't work.

AMPScript was limited in an update in February, so it should no longer possible to poll/update data extensions that are not Shared Data Extensions with this ENT. method from Child BUs.

I am not sure if Synchronized DEs are considered Shared. Just ran a test in a non-multi org environment, and it worked, but best be safe. This definitely should not work in Multi-Org.

If you have been through all of the above steps and the DE persistently cannot be found, try a lookup with another, Shared DE.

If that works, get your Synchronized DE's content into a Shared Data Extension with an hourly SQL Query first. Then perform the lookup on that Shared DE. It will a bit more latency but in some setups your only option.

My source for the February change is an SF Email quoted below

AMPScript and Enterprise Level Data Extension Changes

As part of our commitment to customer trust, we will introduce a change to how Enterprise Level Data Extensions are accessed at the Business Unit levels. Previously, all data extensions stored at the enterprise level could be accessed at the business unit level by using the "ENT." prefix. Beginning February 9, 2019, AMPscript functions accessing data extensions without the sharing access will result in an error, potentially stopping messages from being sent.

AMPscript functions impacted include: Lookup, LookupOrderedRows, LookupOrderedRowsCS, LookupRows, LookupRowsCS, UpsertData, Upsert DE, UpdateData, UpdateDE, ClaimRow, ClaimRowValue, DataExtensionRowCount, DeleteData, DeleteDE, InsertData and InsertDE

If you have messages with AMPscript in content that reference enterprise-level data extensions that have not been shared with the business unit, this can be fixed by ensuring that these data extensions are stored in a shareable data extension folder. If your intent is to hide visibility of these data extensions, your message content will need to be modified.

  • 2
    Synchronised Data Extensions are exempt from the limitations to querying DEs in ENT BU from child BUs. Commented May 13, 2019 at 17:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .