I searched this forum and couldn’t find a clear answer.
My goal
I would like to be able to display a Skuid page with basic aggregate metrics on my Contact Salesforce object with over a million records and for this data to update automatically with my Contact object.
1st Approach
I developed a Skuid chart that performs the aggregate count function over my salesforce Contact object containing over a million records and ran into two constraints.
For normal users, it could only count records they have read permissions to, which would not be the entire dataset.
For admin users, the loading the page would generate an Apex CPU time limit exceeded error, likely because a million records were being counted at that time. The records should be counted once and stored as a value to access, so that’s why I next tried roll-up summary fields.
2nd Approach
I created custom object with a roll-up summary field. My Contact object was already a master in a master-detail relationship so creating a master to Contact isn’t allowed. I also explored declarative lookup roll up summary application. That solution required creating a lookup relationship to my new custom aggregate object, specifying the row I want to update. However I ran into issues with this as well. My simple count function would always return zero with no errors. I don’t know why this isn’t working and I have a question out in the DLRS community forum. I suspect permissions issues.
3rd Approach
Next I tried to create a new model in Skuid, pointed it to my Contact object and set the model behavior as aggregate. Chose the field I wanted to count and when I tried to display that value in a chart it says “No data to display”… in a text field the value stays blank. My guess is that this is due to permissions issues. I can’t give read access to the entire Contact data set to everyone, so this approach may be a dead end. Are there any logs in salesforce I can check to verify if this is a permissions issue?
4th Approach
Tried to create a salesforce report with the information I need and access it in Skuid. Unfortunately, after creating a report over my Contact object in salesforce, I can’t see it among the list of objects when I tried to create a model in Skuid. I can only view salesforce objects. I’ll be ok with simply displaying salesforce reports and charts on a Skuid page, but it looks like that may not be possible. reference This reference also suggests to try using Skuid reports, but I’ve tried those.
Any suggestions on any of my approaches would be helpful. I’ve been trying to solve this issue for over a week.