function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
devindiaadevindiaa 

System.URL.getSalesforceBaseUrl().toExternalForm() Salesforce1

Hi,

I am using below code to post my data to feeds in my APEX class:
System.URL.getSalesforceBaseUrl().toExternalForm() + '/' + ld.Id;

But when accessed from Salesforce1 it is taking to full salesforce site. How can modify my code, so that if accessed from Salesforce1 it stays in Salesforce1 and do nto go to full site.

Many Thanks
Laxmi
EnreecoEnreeco
Can you simply redirect to [ "/"+ ld.Id ] (relative path)?

--
May the Force.com be with you!