Email Message Model not returning any rows
I am creating a very simple model of type "Email Message" and then displaying all rows in a table.
For some reason the table returns "No email message to display", however I can query the same object in Developer Console and it returns 5 rows.
There are not filter conditions on the model.
For some reason the table returns "No email message to display", however I can query the same object in Developer Console and it returns 5 rows.
There are not filter conditions on the model.
Tagged:
4
Categories
- 7.9K Questions
- 926 Ideas
- 220 Discussion Categories
- 178 General
- 9 Community Feedback
- 3 Community Info
- 18 Knowledge Base
Comments
Open the console and type:
skuid.$M('YourModelName')
This will return the full javascript object related to the model. I look at the following nodes of that object.
data: Here you will see whether you are actually getting data on your page. If data is there, there is a problem with the table component you put on the page.
accessible: Here you will see whether skuid can actually query the model.
soql: Here you will see the actual query passed to the database by skuid. Does this match exactly what you put in the sf dev console?
Etc.... Happy debugging
I followed your steps and looked at the javascript generated for the model. As per the js object's properties :
isQueryable = True
accessible = true
query = SELECT ActivityId,Subject,Id FROM EmailMessage LIMIT 21 (returning proper results in the console)
however data array is empty.
I also compared the javascript object with another contact model and everything looked exactly same.
@Rob - any ideas as to why this would be? Seems like something on the platform level, but no idea what...
Hope that helps!
What we are trying to achieve is to put in a table in the Lead View all the emails that were sent to each lead, so that our salespeople can see immediately what they already sent.
Right now we managed to connect to the Task model the description field, but that is quite ugly to see, as there is everything in one field.
We would like to put in the different fields for the EmailMessage model (like subject, body of the mail and so on).
We tried with this condition: activityId is in the set of values of the id field of the task model.
We also tried putting in directly the id of a specific message, but the answer was always "No email message to display"
So right now we are trying to understand if it's we that are missing something, of it's a problem with Skuid..
We have checked the following
1. We have enhanced email on
2. The model says it is accessible = true and isQueryable = true
Is there a workaround for this? If not, will this be fixed in a skuid patch coming up?
Enhanced Email is enabled for my org. The model should be working but gets no data. Console output:
Maybe it's a Skuid version problem? I am seeing rows returned from a model on the EmailMessage object. This is with Skuid 10.0.10 installed.
Thanks,
Bill
Bill, what's the related object (the whatID) of the Activity object in your EmailMessage model? In my model the whatID connects my Activity to a custom object.
I see ActivityId as a field on EmailMessage, but I don't have any records linked by this field.
I only see records linked to RelatedToId field. Is this what you are asking?
Thanks,
Bill
I see Opportunities and a custom object in the RelatedToId field.
Thanks,
Bill
What I'm working on is a Page Include with a table of Activities (aka Task model). I created a drawer to show the email body when the Activity is an email. I had an EmailMessage model with an ActivityID condition that was referring to my Task model ... however I was not thinking correctly about this. I was relying on an EmailMessage model condition that looked to the Task model, but it just happened that the first Task model record had no EmailMessage record. Instead of a model condition, I needed a Row Context condition in the Field Editor.
I also had to learn about the urlDecode Global Merge:
https://docs.skuid.com/latest/en/skuid/merge-syntax/global-merge-variables.html
My EmailMessage template field now has this content: {{#urlDecode}}{{{HtmlBody}}}{{/urlDecode}}
I'm thrilled about this because with Skuid I'm now able to give my users a way to review email history on a record that is way better than Lightning, which doesn't render html when viewing activities/"log a call" in a list or a report. We've been making big use of Lightning for Gmail, and trying out Cirrus Insight, which means our users are pushing in a lot of EmailMessage records.
Glad you got it working and thanks for posting your solution. I have used the {{#urlEncode}} quite a lot, but I forgot that there is also a {{#urlDecode}}. Makes it simple to render HTML from a field.
Thanks!
Bill