Embed Preference Form into a Web - Privacy Center

22 Views Asked by At

I am trying to embed a form created in Preference Manager

I have the form, and the Embed Code, I insert it into a website, and I pass it the token of the ID of an Account, but it gives me an error when loading

On inspection I can see this: Access to fetch at 'https://mytestprivacy-dev-ed.trailblaze.my.salesforce.com/services/PreferenceCenter?prefCenter=MyFormv3' from origin 'https://XXXXXX.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

The form is simple, only the Active field of the Account is displayed

I generate the token with an Id from an Account using pref_center.TokenUtility.generateToken(acc.Id), I have also tried to export a csv with the Id

In the web I embed the code of Preference Manager and I call the web in this way: https://XXXXXX.com/?pctoken=QTA2MDAwMDAwY1VGaUpUWmI1V0FmVEpGeEZ3bWJCMGkvdjBaSFZweTArZ0pMVEFwV0YwRnZ3M2V4MWVoRzlUR1dRc1RDUGx4c3BxYzNDWit0UUpLWjgrRnllQkREL21VQnZBQWlhMHA1N29jdjd1WTMwSFl5ZXBUOGhSTU40Z0xoWVR4K3BDYW10V21YVkVjZWpVM3p1YlV4K2xPeHRTL3BNUT09

Are there any additional steps? Is it necessary to enable something else?

Error load form

0

There are 0 best solutions below