You need to sign in to do that
Don't have an account?
Madhanprabhu Thangadurai 1
sforce.one.navigateToRelatedList is not working.
Hi Guys,
I'm trying to implement the basic Salesforce1 navigation in my Developer Org. I'm using the following code snippet to navigate from a Command Link to Related List of a Custom Object. I have hard-coded the Related List ID and Parent Record ID in the javascript.
<apex:page showHeader="false" >
<script type="text/javascript">
function navigateToList()
{
if( (typeof sforce.one != 'undefined') && (sforce.one != null) )
{
sforce.one.navigateToRelatedList('00N9000000DQ4yq','a049000000WQcOO');
}
}
</script>
<apex:form >
<apex:commandLink value="Navigate to link" onclick="navigateToList();"/>
</apex:form>
</apex:page>
But when i try to click on the Command Link ( Navigate To Link ), i'm getting the following Error. Your helps are highly appreciated. Thanks in advance.
I'm trying to implement the basic Salesforce1 navigation in my Developer Org. I'm using the following code snippet to navigate from a Command Link to Related List of a Custom Object. I have hard-coded the Related List ID and Parent Record ID in the javascript.
<apex:page showHeader="false" >
<script type="text/javascript">
function navigateToList()
{
if( (typeof sforce.one != 'undefined') && (sforce.one != null) )
{
sforce.one.navigateToRelatedList('00N9000000DQ4yq','a049000000WQcOO');
}
}
</script>
<apex:form >
<apex:commandLink value="Navigate to link" onclick="navigateToList();"/>
</apex:form>
</apex:page>
But when i try to click on the Command Link ( Navigate To Link ), i'm getting the following Error. Your helps are highly appreciated. Thanks in advance.
I got solution from the following link
https://help.salesforce.com/apex/HTViewSolution?id=000206740&language=en_US (https://help.salesforce.com/apex/HTViewSolution?id=000206740&language=en_US)
You need to mention your API name instead of related List ID.
For Standard Case Object - sforce.one.navigateToRelatedList('Cases','{!Account.Id}');
For Custom Object (eg - MyCustom__c) - sforce.one.navigateToRelatedList('MyCustom__r','{!Account.Id}');