Here's How to Embed a Card into a Salesforce using Visual Force and filter the card by AccountID
Did you really figure out how to do this Canio?
And, I'm sharing this with you b/c it's been something that has been bugging me for the better part of 4 years. I appreciate all the help I have gotten from various people to help finally figure it out. I truly hope this is helpful to you.
See my reply.
Good luck!!!
Best Answer
-
Here is the code you enter into Salesforce Visualforce page. Feel free to play around with the margin and height. The below dimensions are for a side column that I found worked for me.
A few FYI's that you should take note of.
- Make sure you use the Domo name for the Column you're passing the Saleforce ID value into
- Make sure that you use the Saleforce naming convention for Account.ID in Value (or Contact.ID, Opportunity.ID, etc)
- What finally worked for me was putting the {! } between the %22 %22 like this: %22{!Account.Id}%22
- In the Domo Card I did NOT put the Account ID as a filter. When I did, the VF code wouldn't work.
<apex:page standardController="Account">
<iframe src="https://thankmelater.domo.com/embed/card/xxxx5086?enable=title&pfilters=[{"column":"AccountId%22,%22dataType%22:%22STRING%22,%22operand%22:%22IN%22,
%22values%22:[%22{!Account.Id}%22]}]
" width="400" height="250" marginheight="0" marginwidth="0" frameborder="0" scrolling="yes"></iframe></apex:page>if you aren't sure what the datatype is then you can always press f12 on your browser, go to the Network tab, find a "cards" box, and expand the filters carrot until you see the data type of the column you want to filter on.
In this case I looked up AccountId and found it was string. Don't worry about filterType: "LEGACY", it did nothing for the filtering in visualforce
Here's what the visualforce code should look like in your SF instance.
And here's what a card looks like on a lightning page. In this case it's a smaller card, but I'll play around with the card types now that I have it working
1
Answers
-
Here is the code you enter into Salesforce Visualforce page. Feel free to play around with the margin and height. The below dimensions are for a side column that I found worked for me.
A few FYI's that you should take note of.
- Make sure you use the Domo name for the Column you're passing the Saleforce ID value into
- Make sure that you use the Saleforce naming convention for Account.ID in Value (or Contact.ID, Opportunity.ID, etc)
- What finally worked for me was putting the {! } between the %22 %22 like this: %22{!Account.Id}%22
- In the Domo Card I did NOT put the Account ID as a filter. When I did, the VF code wouldn't work.
<apex:page standardController="Account">
<iframe src="https://thankmelater.domo.com/embed/card/xxxx5086?enable=title&pfilters=[{"column":"AccountId%22,%22dataType%22:%22STRING%22,%22operand%22:%22IN%22,
%22values%22:[%22{!Account.Id}%22]}]
" width="400" height="250" marginheight="0" marginwidth="0" frameborder="0" scrolling="yes"></iframe></apex:page>if you aren't sure what the datatype is then you can always press f12 on your browser, go to the Network tab, find a "cards" box, and expand the filters carrot until you see the data type of the column you want to filter on.
In this case I looked up AccountId and found it was string. Don't worry about filterType: "LEGACY", it did nothing for the filtering in visualforce
Here's what the visualforce code should look like in your SF instance.
And here's what a card looks like on a lightning page. In this case it's a smaller card, but I'll play around with the card types now that I have it working
1 -
-
@J_Tsang for sure
1
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 738 Beast Mode
- 56 App Studio
- 40 Variables
- 685 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 124 Manage
- 121 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive