Skip to main content

Hi Experts, 

 

I created a Data Mapper to get Product, Pricebook, and Pricebook Entry data. I mapped Product Name, Description, and Unit Price. 

 

Then I used this Data Mapper in a FlexCard. But after saving and fetching, the fields are not showing in the FlexCard. 

 

I have attached a screenshot for reference. I am not sure what I missed. Can anyone please help me fix this issue?

 

FlexCard Not Showing Data from Data Mapper

 

Image__2.png

 

 

Image__3.png

 

@Nonprofit Hub@Fundraising@Salesforce Administrators & Developers

4 respuestas
  1. 13 abr, 22:28

    Your individual fields array from the DataMapper are under the parent node "Products". For the fields to be available in FlexCard the resulting JSON must be a simple JSON array without child nodes. 

     

    Essentially, your current JSON is this:

    {

    Products:{

    ID:"1",

    Name:"Product1",

    Description:"Product1",

    UnitPrice:100

    },

    {

    ID:"2",

    Name:"Product2",

    Description:"Product2",

    UnitPrice:200

    }

    }

    }

     

    While it should be like this: 

     

    {

    ID:"1",

    Name:"Product1",

    Description:"Product1",

    UnitPrice:100

    },

    {

    ID:"2",

    Name:"Product2",

    Description:"Product2",

    UnitPrice:200

    }

    }

     

    There are two fixes: 

    1. Make sure the DataMapper output omits "Products:" prefix from all JSON output paths. OR 

    2. On your Flex Card Data source setup select ["Products"] in Result JSON Path.

0/9000