You need to sign in to do that
Don't have an account?
bsil bsil
visualforce page issue in salesforce1
Hi,
I have displayed visualforce page in standard page layout
as shown in the below screen
i have displayed two links in visualforce page.
when i click on like it gets open new window. it is working fine in desk top application.
it's taking two steps to open link like below screens
visualforce code:
<apex:page standardController="task" extensions="SurveyandStepsController" docType="html-5.0">
<apex:form >
<script>
function navigate(){
var proid = '{!prosteps.id}';
var tasid1 = '{!taskId}';
var steUrl = '/apex/StepsAttachmentShow?id='+proid+'&taskid='+tasid1;
if( (typeof sforce != 'undefined') && (sforce != null) ) {
// Salesforce1 navigation
sforce.one.navigateToURL(steUrl);
}
else {
window.open(steUrl);
}
}
function navigatesurvey(){
var surveyid = '{!surveyid.id}';
var accid = '{!correnttask.Whatid}';
var tasid = '{!taskId}';
var surveyUrl = '/apex/TakeSurvey?id='+surveyid+'&Accname='+accid+'&taskid='+tasid;
if( (typeof sforce != 'undefined') && (sforce != null) ) {
// Salesforce1 navigation
sforce.one.navigateToURL(surveyUrl);
}
else {
window.open(surveyUrl);
}
}
</script>
<div >
<br/>
<div style="height:100%;width:50%;float:left;">
<b><apex:commandLink onclick="navigatesurvey();return false;" value="Click here for Survey" rendered="{!surveyid != null }"/></b>
</div>
<div style="height:100%;width:50%;float:right;">
<b> <apex:commandLink onclick="navigate();return false;" value="Click here for Steps" rendered="{!prosteps != null }"/></b>
</div>
</div>
</apex:form>
</apex:page>
I am new to salesforce1
can anyone knows kingly suggest me how to implement
Thanks in advance
I have displayed visualforce page in standard page layout
as shown in the below screen
i have displayed two links in visualforce page.
when i click on like it gets open new window. it is working fine in desk top application.
coming to salesforce1
it's taking two steps to open link like below screens
visualforce code:
<apex:page standardController="task" extensions="SurveyandStepsController" docType="html-5.0">
<apex:form >
<script>
function navigate(){
var proid = '{!prosteps.id}';
var tasid1 = '{!taskId}';
var steUrl = '/apex/StepsAttachmentShow?id='+proid+'&taskid='+tasid1;
if( (typeof sforce != 'undefined') && (sforce != null) ) {
// Salesforce1 navigation
sforce.one.navigateToURL(steUrl);
}
else {
window.open(steUrl);
}
}
function navigatesurvey(){
var surveyid = '{!surveyid.id}';
var accid = '{!correnttask.Whatid}';
var tasid = '{!taskId}';
var surveyUrl = '/apex/TakeSurvey?id='+surveyid+'&Accname='+accid+'&taskid='+tasid;
if( (typeof sforce != 'undefined') && (sforce != null) ) {
// Salesforce1 navigation
sforce.one.navigateToURL(surveyUrl);
}
else {
window.open(surveyUrl);
}
}
</script>
<div >
<br/>
<div style="height:100%;width:50%;float:left;">
<b><apex:commandLink onclick="navigatesurvey();return false;" value="Click here for Survey" rendered="{!surveyid != null }"/></b>
</div>
<div style="height:100%;width:50%;float:right;">
<b> <apex:commandLink onclick="navigate();return false;" value="Click here for Steps" rendered="{!prosteps != null }"/></b>
</div>
</div>
</apex:form>
</apex:page>
I am new to salesforce1
can anyone knows kingly suggest me how to implement
Thanks in advance
here also am getting same problem.
in borwser i am not getting any issue.
it's only problem in salesforce1
thanks for ur response...!
I checked this in-house and seems this is WAD - following is suggested as a consideration when implementing vf pages with SF1 app:
** You can also add inline Visualforce pages to a record detail page layout. Pages added this way don’t need to
be enabled for mobile use, but do consider how the page will appear when it displays on a mobile device. In general,
Visualforce added to page layouts works best if it’s read-only, at-a-glance information.
A possible workaround would be to use custom links instead of having a separate page with these two links.
You can create 2 custom links on the detail page which point to the pages you wish to open..
Any update on the issue?
I am also facing a similar situation.
Please help.
Thanks!!