Skip to main content

Hi guyz,


Any one please help me out, How can i include Social links in our SKUID Account/Contact detail pages.


I’m trying with this Iframe code by using Template:



I got Icons like below, but the links are not worinkggggggg…


Some times i got error like below


Please help me out 🙂


Thanks,

Shaik.

{{{$Param.Id}}} or {{$Param.Id}} will not work if Id isn’t pointing to a Contact record. There’s an org I’m working in that is using the same “c__SocialProfileViewer” where the id in the URL parameter is for an object that is not a Contact record. Switching the merge syntax to point to a model that is based on the Contact object fixed the issue. I would also recommend conditionally rendering the Template Component based on whether or not the Model has any rows in it.


Also, where does this VF page come from? c__SocialProfileViewer?


Actually I don’t think Pat is correct. The merge syntax: {{$Param.ParamName}} does not depend on model context. It is one of our global merge syntax items. (See this document for more)


However I’m guessing that the Id is not actually getting popuplated in the parameter - and therefore not getting passed to the VF page. This is why it is breaking.


You can test the parameters on the page in the browser console. Type: skuid.page.params in the console to get the actual values that are being passed into the page.



Another factor might be that it is expecting the 15 character ID and you might be passing it the 18 character ID in the parameter.


You misunderstood my meaning. There is an id in the URL but it is an Id for an object that is not the Contact.


I’ve seen this before with “c__SocialProfileViewer”. The VF works when an Id is for a record in the Account, Contact or Lead object.


https://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_social_profileViewer.htm


So, if the page the user is on has an URL id parameter, it must be an id of a record for the Account, Contact or Lead object.


I suspect the page Shaik is attempting to use this “c__SocialProfileViewer” VF page is not for any of these objects, but for some other object. If it’s for the same org that I work on as well, then it’s the “Elite_Agent__c” object.


Just looked into it, and now the page in question does display but the icons don’t work as expected. The error in the javascript has something to do with UserContext and since I’ve seen this gigantic piece of js code or UserContext, this is where I’ll stop.



I suspect that once the VF page is loaded, the JS code looks in the current windows URL for the things it’s looking for. ie. the URL parameter for the Elite Agent Detail page vs the Id from the Template Component, and thereby breaking the code since the it’s not a Account, Contact or Lead record.


Screenshots of the errors.



I think you are right Pat. 


The c__SocialProfileViewer VF page working in a template on a Contact record w/ an URL parameter of a Contact record.


The c__SocialProfileViewer VF page not working in a template on a Elite Agent record w/ an URL parameter of a Elite Agent record.


The Contact record uses an old version of the Page Include component. I don’t think this functions any differently than with a Template component. Which is to say the id passed into the rendering of the VF page gets the id from the query string or from the src in the iFrame. Problem is that once the page is loaded, it then looks in the current windows URL for the id parameter. Not a problem on the Contact record, but it is so on the Elite Agent page as the id is for an Elite Agent record.



The Social Account and Contacts salesforce feature is nicely contained in the SocialProfileViewer VF page.

When putting this into an iFrame of a Template component, none of the expected functionality is working.

When putting this into Page Include component as a VF page, everything works as expected. The issue with this is that this version of the Page Include is unsupported.

Anybody have thoughts on how to make it work using a Template?



I don’t know about getting this to work in a template, but I do know that even though we have deprecated the visualforce page include - we are still supporting it. If you set the properties in XML, they will work.


The xml should look like this:


                           <includepanel type="visualforce" pagename="c__SocialProfileViewer" querystring="?id={{$Param.id}}"/>

We deprecated the VF page include because VF pages that allow data updates simply did not work. But the social profile viewer is one that does work well.