Shot in the dark here - I can’t see your actual url but I think url params are case sensitive, so maybe try the page include query string with a lowercase ‘i’ so…?id={{$Param.id}}
Ty Greg,
I had tried that, and did not work as well
Hi Dave, it looks like that on the account page the Account id = the param ID (all caps). So try changing your query string to id={{$Param.ID}}
If that fails, you could try id={{$Model.Account.Data.0.Id}} but make sure the Id field is included in your Account model first.
or maybe you should change that condition on your account model so that Account Id = param Id (capital I lowercase d)
Thank you Anna,
I tried first changing to Id (my bad) , but did not change anything, still all records displaying
Then I tried the id={{$Model.Account.Data.0.Id}} and made sure the field is included in model
But now I get errors:
- An error occurred while attempting to perform the following SOQL query: SELECT Id FROM Account WHERE (Id = ’ ') LIMIT 21 Error:invalid ID field:
- An error occurred while attempting to perform the following SOQL query: SELECT Subject,CreatedBy.Name,Call_Number__c,CallDisposition,CallDurationInSeconds,CallType,ActivityDate,Id FROM Task WHERE (AccountId = ’ ') ORDER BY SystemModstamp DESC LIMIT 21 Error:invalid ID field:
That made me think , maybe the issue is the condition on Models in the page I want to include(activities)?
The error #2 refers to a model on the Activities page name: calls
and here’s it’s model condition
Is it the correct setting?
Thank you
Hi Dave,
I’ve got this working using the following query string for the page include: “id={{$Param.id}}” (without the question mark character at the beginning of the query string which you have in the first post. That may or may not be the issue or you may have already tested that.)
I’ll paste the xml for each of the pages here - you can paste this into new pages in your org, and then if it works, continue building out the rest of your page(s) based on that. It did take a few seconds to load the data in the page include, but it was all there eventually and all related to the Account specified in the url.
Also - you may need to reset the ‘Skuid Page’ field once created in your org - this field may (I’m not sure) reference the specific page record id which will be different in your org than mine:
Tasks list page for inclusion in Account detail page:
<skuidpage unsavedchangeswarning="yes" showsidebar="true" showheader="true" tabtooverride="Account"> <models>
<model id="Tasks" limit="20" query="true" createrowifnonefound="false" sobject="Task">
<fields>
<field id="ActivityDate"></field>
<field id="LastModifiedDate"></field>
<field id="Status"></field>
<field id="Subject"></field>
<field id="Account.Name"></field>
</fields>
<conditions>
<condition type="param" value="Id" field="AccountId" operator="=" enclosevalueinquotes="true" novaluebehavior=""></condition>
</conditions>
<actions></actions>
</model>
Account Detail page:
<skuidpage unsavedchangeswarning="yes" showsidebar="true" showheader="true" tabtooverride="Account"> <models>
<model id="Account" limit="1" query="true" createrowifnonefound="false" sobject="Account">
<fields>
<field id="Name"></field>
<field id="CreatedDate"></field>
</fields>
<conditions>
<condition type="param" enclosevalueinquotes="true" operator="=" field="Id" value="id"></condition>
</conditions>
<actions></actions>
</model>
{{Name}}
{{Model.label}}
I hope that helps!
Dave, also can you confirm that the “Account Id” field is included in your Account Model? Because it seems like from the error messages that the Id parameter is getting passed through, but the actual value of the Account Id is not.
HI Anna,
Yes, the ID field in account model is included
By any chance would my issue have anything to do with the fact I’m using my own Visualforce Page and use the component for that “account” skuid page? ( i had read another similar post over the weekend, and not sure if I understood correctly)?
Thx
Hmm, I’m not sure about that, I will check about it. Also, I would suggest taking the ? out of the parameter string for the page include - Skuid should append the proper connector automatically.
Dave,
This scenario should work. Case does matter, so pick one form of “Id” and stick with it. I’m going to go with “id” here, so here are a few things I would try/double check:
- The condition of your Account model on your Account page should be Id = {{$Param.id}}
- The Query String of your Page Include component on your Account page should be id={{$Param.id}}
- The Condition on your Calls model on your Activities page should be AccountId = (param) id
- Whenever accessing your Account page, use “id=” in the query string
- Make sure all model names are unique between the two pages (e.g. You don’t have a model named Account on both pages)
I hope that all helps.
The condition of your Account model on your Account page should be _Id = {{$Param.id}}
Checked: _
The Query String of your Page Include component on your Account page should be id={{$Param.id}}
Checked
The Condition on your Calls model on your Activities page should be AccountId = (param) id
Checked
Whenever accessing your Account page, use “id=” in the query string
Not sure what you mean here
Make sure all model names are unique between the two pages (e.g. You don’t have a model named Account on both pages)
**_Checked
And now i get a different error. It seems the ID is being passed but says Invalid?
_**
2. An error occurred while attempting to perform the following SOQL query: SELECT Id FROM Account WHERE (Id = '0014000001e4s6R ') LIMIT 21 Error:invalid ID field: 0014000001e4s6R
- An error occurred while attempting to perform the following SOQL query: SELECT Subject,CreatedBy.Name,Call_Number__c,CallDisposition,CallDurationInSeconds,CallType,ActivityDate,Id FROM Task WHERE (AccountId = '0014000001e4s6R ') ORDER BY SystemModstamp DESC LIMIT 21 Error:invalid ID field: 0014000001e4s6R
Thx
There is a space in that query, right after the “(Id = '0014000001e4s6R” part. Do you have a space in your URL after your id parameter? Look for something like…
…/apex/AccountPage?id=0014000001e4s6R &otherparam=something…
…or…
…/apex/AccountPage?id=0014000001e4s6R%20&otherparam=something…
…in your browser’s address bar.
My URL is the Standard URL, as mentioned earlier, i’m using my own Visualforce Page and use the component
I tried to Preview the Skuid page so I can see VF URL , and do not see any space in it, and still get same error
htttps://skuid.na2.visual.force.com/apex/skuid__ui?page=Advance_Loan_snippet_on_Account&id=0014000001e4s6RAAQ (the only difference I can see, is error Had 15 digit ID, and this link has 18 digits)
Thank you for your help, I feel we are getting closer.
If simpler for you, I have Granted Skuid Access to my Org
Page name:Advance_Loan_snippet_on_Account
Sure thing. It looks like you’ve got a space at the end of your Query String parameter:
Trying removing that space, and see if that’s any better.
That moment , when All I can say is :
Thank you very Much J! I would have prob never caught that error lol
Sure thing! I’m glad we got it sorted.