Skip to content

Instantly share code, notes, and snippets.

@TehNrd TehNrd/gist:9242970
Last active Jun 12, 2017

What would you like to do?
Check to see if Visualforce page is inside Salesforce1
//Determin if this is SF1 app
public static Boolean isSF1(){
if(!Utils.checkNullOrBlank(ApexPages.currentPage().getParameters().get('sfdcIFrameHost')) ||
!Utils.checkNullOrBlank(ApexPages.currentPage().getParameters().get('sfdcIFrameOrigin')) ||
ApexPages.currentPage().getParameters().get('isdtp') == 'p1' ||
(ApexPages.currentPage().getParameters().get('retURL') != null && ApexPages.currentPage().getParameters().get('retURL').contains('projectone') )
return true;
return false;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.