You need to sign in to do that
Don't have an account?
Siddharth Prakash
Emebedded dashbaord page does not work , it opens up a dashboard list
Hi team,
Before Spring 15 , my dashboard was getting embedded properly in salesforce user homepage. But, now i am getting a page that opens up into the dashboard page and is not a part of the home page any more ???? Is there some new change with respect to iframe.
Please advise urgently.
I have the following visualforce page:
<apex:page sidebar="true" showHeader="true">
<!--Hello {!$User.FirstName} {!$User.LastName} {!$UserRole.Name}-->
<iframe id="myFrame" height="100%" width="100%" frameborder = "no" scrolling = "no"></iframe>
<script type = "text/javascript">
var sw = "{!$UserRole.Name}"
var iframe = document.getElementById('myFrame');
if (condition1) {
iframe.src = "/01Z40000000MXOu?isdtp=mn";
}
else if (condition2") {
iframe.src = "/01Z40000000MXQR?isdtp=mn";
}
else if (condition3) {
iframe.src = "/01Z40000000MXOu?isdtp=mn";
}
else if (condition4) {
iframe.src = "/01Z40000000MXOp?isdtp=mn";
}
else if (condition5) {
iframe.src = "/01Z40000000MXOk?isdtp=mn";
}
</script>
</apex:page>
Before Spring 15 , my dashboard was getting embedded properly in salesforce user homepage. But, now i am getting a page that opens up into the dashboard page and is not a part of the home page any more ???? Is there some new change with respect to iframe.
Please advise urgently.
I have the following visualforce page:
<apex:page sidebar="true" showHeader="true">
<!--Hello {!$User.FirstName} {!$User.LastName} {!$UserRole.Name}-->
<iframe id="myFrame" height="100%" width="100%" frameborder = "no" scrolling = "no"></iframe>
<script type = "text/javascript">
var sw = "{!$UserRole.Name}"
var iframe = document.getElementById('myFrame');
if (condition1) {
iframe.src = "/01Z40000000MXOu?isdtp=mn";
}
else if (condition2") {
iframe.src = "/01Z40000000MXQR?isdtp=mn";
}
else if (condition3) {
iframe.src = "/01Z40000000MXOu?isdtp=mn";
}
else if (condition4) {
iframe.src = "/01Z40000000MXOp?isdtp=mn";
}
else if (condition5) {
iframe.src = "/01Z40000000MXOk?isdtp=mn";
}
</script>
</apex:page>
You must load the content within it's serving domain, for example:
You can have a link to the report/dashboard to open in a new window or the current document by using the target attribute within the <apex:commandLink> component or <a> tag
I hope this helps.
If my answer helps resolve your query, please mark it as the 'Best Answer' to benefit others and improve the overall quality of Discussion Forums.
Gaurav Kheterpal
Certified Force.com Developer| Developer Forums Moderator| Dreamforce Speaker
Could you please elaborate on this ? I know i can embed a link - which will open to a different tab/new page.
My current requirement is that it should load on that homepage. This is required so that my sales leads can see what is pending where without having to browse through the dashboards.
Any pointers will be helpful.
Regards
Siddharth
If my answer helps resolve your query, please mark it as the 'Best Answer' and upvote it to benefit others and improve the overall quality of Discussion Forums.
Gaurav Kheterpal
Certified Force.com Developer| Salesforce Mobile Evangelist| Developer Forums Moderator| Dreamforce Speaker
We were able to solve this by using self.location.href ="complete URL" in the javascript and have been able to render the dashboards the home page. Thanks for your help though.
Regards
Siddharth
I too have same problem, would you mind sharing your code with us?
Thanks,
Venkat
This workaround no longer seems to work. Every variation I try on
<apex:outputPanel >
<script>
location.href="(the url)"
</script>
</apex:outputPanel>
</apex:page>
does the same thing: take me from the home page to the dashboard page instead of popping the dashboard page inside the home page component. I have tried with apex:iframe; I have tried it using apex:outputPanel instead of iframe (as shown here); I ahve tried without outputpanel and just the script; I have tried with and without the "vw" instructions at the end of the URL.
Is there any way to get the dashboard page to show up in a scrollable dashboard component any more?
Thanks,
John