I'm currently building a custom preference center and want to give business users an easy option to add/map additional fields for preferences based on salesforce fields.
I'm thinking about creating a mapping Data Extension, that holds all the fieldnames. AMPscript loops through them to display and update the fields within Salesforce.
Is there an option to dynamically retrieve fields from Salesforce?
Instead of setting the Salesforce fields names as hardcoded parameter I'd like to set them via a variable. Something like this:
SET @fields = "field1__c, field2__, field3__c" SET @SFID = RetrieveSalesforceObjects('Lead', @fields, 'criterea', '=', 'xyz')