I am trying to have a table on a contact record that shows the field history for this contact. I have read many of the post and I understand that it will not look the same as the native table but I can’t get it to pull anything. I know it is the way I setup my conditions. I am building this on a contact detail page that I have tab set and one of the tabs I want to show the history of the contact.
The main condition is on the contact model that is Id=(param)Id
Condition I have tried on the History model:
ContactId = (Contact) Id
Contact.Id = (Contact) Id
ContactId = (param) ContactId
Contact.Id = (param) ContactId
ContactId = (param) Contact.Id
Contact.Id = (param) Contact.Id
I would love any suggestions. Thanks
I believe the issue is that you need to create a separate model on the contact_history object. Then you apply a condition on that model to restrict it to just the contact Id in context.
That was what I was trying to do. The contact model has the param condition on it and the Contact
_History model I have used the conditions above and none of them brings up data.
Sorry, I missed that. The URL parameter is a page parameter and is the same for all models loaded on the page, so (param)Id should work for your history model too since that URL parameter is the Contact Id.
Following your syntax Sierra, it should be:
ContactId = (param) id
Or in terms of the Model Condition setup, here’s what it would be:
Salesforce SObject for your Model: ContactHistory
Condition Setup:
Field: ContactId
Value: Page / URL Parameter Value, Parameter Name: id
So I have setup the models with those conditions but it still is not pulling any information in. If I tell it to load on Model data on page load I just get the word “loading” on the page and nothing else happens. If it is not checked them the table comes up empty.
Your original post says that your contact model has a condition Id=(param)Id . Assuming that works on your contact model, that should mean that your URL parameter is “Id”, not “id”. Did you try ContactId= (param) Id with a capital i ?
Yes I am using the Capital I but I have tried it both ways and it doesnt work.
What if you try a different option? Instead of making the condition based on a URL parameter, what if you make it based on a field on another model. Then pick your contact model’s Id field.
Yeah I tried that too. I tried it with both of these options.
ContactId = (Contact) Id
Contact.Id = (Contact) Id
Neither worked.
Did you add ContactId to your history model? It sounds like it isn’t in the model.
Yes I did.
I looked through some pages I’ve built. I displayed the history of a custom object and I used: ParentId= (param) id
I dont see a ParentId for contact history
Did you activate field tracking for contacts in Salesforce settings?
yes. This feature works fine on the native pages just cant get it working on the Skuid side
If you remove all conditions on your history model, do any records populate?
No I dont get any record to populate
Seems like a problem with the model settings, not the condition. I think you should get some records in the absence of any conditions. If you are unable to get any records under any circumstances, it seems like a model level problem, not a condition level problem.
So I removed the contact model and just have the ContactHistory model and if I preview it with the “Load Model Data on page load” checked then I get a error.
JSON string exceeds heap size limit
With that unchecked then I get the table but with no information populated
- Also, do fields of your contact model populate? If not, it may be an issue with your URL not containing the actual contact Id as a parameter. 2) Look at the URL of the live page when you are previewing it and make sure it has the parameter “id” or “Id” in it and that the parameter is set equal to the actual Id of one of your existing contacts. 3) Make sure that contact has some changes in the history, otherwise there will be nothing to return. 4) check your model settings to make sure that something in there isn’t causing the problem. Other than that, I’m out of ideas. You have to wait for one of the guru’s to chime in.
Hi Sierra~
Would you mind granting Skuid access to your organization so we can take a look at what’s going on and get this addressed for you? Here is how to do that:
1. Use this tutorial to give us login rights: http://help.skuidify.com/m/getting-started/l/182412-getting-help-how-to-grant-skuid-login-rights-to-your-org
2. Then send an email to support@skuidify.com with the following information:
- Your org Id
- The name of the page where the problem is happening
- The steps required to reproduce the problem.
We’ll see what’s going on…
Thanks!
Karen
Hi Sierra~
I am now able to see contact history on your page. Here is what I did on your contact history model:
- Added a condition (it works with either ContactId from ContactHistory = Page/URL parameter Id OR using Field from another model based on Contact Id)
- Checked the Load Model data on page load
- Set 20 as the Max # of records
Karen
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.