Sep 6, 2016

Lightning experience OR classic view, where am I?

Have you ever faced a problem of identifying in which experience user is opening your page (VFP)? Is it lightning or classic.



Well, here is the solution to it. There are two ways :

1) Via Apex

public boolean isLightningExperience()
{
 if(Apexpages.currentPage().getParameters().get('sfdcIFrameOrigin') != null)
        return true;
 return false;
}

2) Via JS on visualforce page

function isLightningExperience()
{
  if('{!$Currentpage.parameters.sfdcIFrameOrigin}' != '')
  return true;
  return false;
}

You can use two parameters to check this 'sfdcIFrameOrigin' and 'istdp'. Now you can easily identify in which experience the user is via your code and can manipulate the functionality accordingly. 

Happy Coding!!

127 comments:

  1. Nice content. Can we handle the override thing by this ? Suppose we have override the edit button og an object with a vf and i need to show a different lightning component for editing while using lightning experience.

    ReplyDelete
  2. your concept is good, but i have one doubt then how we can write in Soql module can you please explain it.



    Salesforce Training in Chennai

    ReplyDelete
  3. very nice and informative article and useful blog, thank you for sharing with us keep posting
    salesforce training,salesforce online training,online salesforce training

    ReplyDelete
  4. Thanks a lot for offering great informative post. Really liked this awesome post.

    Salesforce Implementation Services

    ReplyDelete
  5. Very informative blog thank you for sharing with us , keep posting learn more about
    salesforce training,salesforce online training

    ReplyDelete
  6. I need a brief explanation coding ,Your simple informative is valuable but not enough for me that i want to know the variations on salesforce classic and lightening experience.



    Salesforce Training in Chennai

    ReplyDelete
  7. This is very informative blog and useful article thank you for sharing with us keep posting more details aboutsalesforce training,salesforce online training

    ReplyDelete
  8. This is very informative blog and nice article , I really like your technique of writing a blog. I book marked it to my bookmark site list and will be checking back in the near future.Salesforce training, salesforce online training

    ReplyDelete


  9. This information is impressive; I am inspired with your post writing style & how continuously you describe this topic.

    Payday loans in Alabama
    Title loans in South Carolina

    ReplyDelete

  10. very usefull informatation.and iam looking for more posts like this please keep updating us........

    ReplyDelete
  11. This information is impressive; I am inspired with your post writing style & how continuously you describe this topic.


    Pawn Shop

    Pawn Loans

    Pawn Shops

    Pawn Loan

    Pawn Shop near me

    ReplyDelete
  12. Thank you for your information. It was very easy to understand. You are expressing it in easy way. The images are very helpful. A very useful blog on lightning protection System, I am having this device in my home and also at my office.

    ReplyDelete
  13. This is very useful informative blog.Thanks for shairng information.To get the details about
    Central Government jobs TamilNadu state 2017-18

    ReplyDelete
  14. Nice information thanks for sharing good blogs.More information Visit
    Krishna University Result

    ReplyDelete
  15. This comment has been removed by the author.

    ReplyDelete
  16. Brilliant, One of the best example and code for knowing the user experience and intensive of having the lightning experience or classic view, As I prefer is Classic View because it has the specific importance of having the user experience easy and well understandable As I completed my PMP Certification in Pune I was having the my PC or other resource as a classic View only Thank you so much for the information and your code Well I look forward for more Updates from you

    ReplyDelete
  17. Boost your career with Salesforce/SFDC on demand CRM, Lightning, world #1 with hands on and scenarios based learning at very much affordable cost. Call-91-9310096831

    ReplyDelete
  18. Really Good blog post.provided a helpful information.I hope that you will post more updates like this salesforce Online Training Hyderabad

    ReplyDelete
  19. Linux Online training in India – Webtrackker Technology is providing the linux online training with 100% placement support. If you are looking for the BEST LINUX & UNIX Training Institute In india or linux online training from india, live project based LINUX & UNIX online training then you can contact to us.

    Python online training in India, RPA Online training in India, Salesforce online training in india, AWS online training in india, Cloud Computing Online Training in India, SAS Online Training in india, Hadoop online training in INDIA, Oracle DBA online training in India, SAP online Training In india, Linux Online training in India








    ReplyDelete
  20. These blog is conveys a useful information to viewers. I like your article is nice.

    Selenium Training in Chennai

    ReplyDelete
  21. Thanks for sharing valuable information and it is useful for onlineitguru provides the best salesforce Online Training Bangalore

    ReplyDelete
  22. This concept is a good way to enhance the knowledge.thanks for sharing. please keep it up salesforce Online Training Hyderabad

    ReplyDelete
  23. The information which you have provided is very good. It is very useful who is looking for salesforce Online Training Hyderabad

    ReplyDelete
  24. "• Nice and good article. It is very useful for me to learn and understand easily. Thanks for sharing your valuable information and time. Please keep updating IOT Online Training
    "

    ReplyDelete
  25. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here.
    I have read your blog its very attractive and impressive. I like it your blog.
    simultaneous interpretation booth

    silent disco headphones

    silent disco headphones
    silent disco headphones
    simultaneous interpretation equipment

    simultaneous interpretation equipment

    bosch simultaneous interpretation system

    ReplyDelete
  26. Thank you for providing useful information and this is the best article blog for the students.learn Oracle Fusion Financials Online Training.

    Oracle Fusion Financials Online Training

    ReplyDelete
  27. Thank you for sharing such a valuable article with good information containing in this blog.learn Oracle Fusion Technical Online Training.

    Oracle Fusion Technical Online Training

    ReplyDelete
  28. Thanks for providing such a great information in the blog and also very helpful to all.learn best Oracle Fusion HCM Online Training.

    Oracle Fusion HCM Online Training

    ReplyDelete
  29. thank you for sharing such a nice and interesting blog with us. i have seen that all will say the same thing repeatedly. But in your blog, I had a chance to get some useful and unique information. I would like to suggest your blog in my dude circle. please keep on updates. hope it might be much useful for us. keep on updating.
    Salesforce Training in Chennai
    German Classes in Chennai
    Salesforce crm Training in Chennai
    Salesforce administrator training in chennai
    best german classes in chennai
    German language training in chennai

    ReplyDelete
  30. Hey Really Thanks for sharing the best information regarding oracle,hope you will write more great blogs.
    Oracle Fusion Financials Online Training

    ReplyDelete
  31. I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well.
    Oracle Fusion Financials Online Training

    ReplyDelete
  32. Thank you for sharing wonderful information with us to get some idea about that content. check it once through
    Machine Learning With TensorFlow Training and Course in Tel Aviv
    | CPHQ Online Training in Beirut. Get Certified Online

    ReplyDelete
  33. Hi, Thanks for sharing nice information about lighting. It is useful contant. Anyhave interest to learn Digital Marketing Course in Ameerpet . Best institutes is Hyderabad Digital Marketing Institutes they all concepts SEO,SMM,SMO ADwords, Affilated Marketing.

    ReplyDelete
  34. Great post and informative blog.it was awesome to read, thanks for sharing this great content to my vision.

    CEH Training In Hyderbad

    ReplyDelete
  35. Hello! I just wish to give an enormous thumbs up for the nice info you've got right here on this post. I will probably be coming back to your weblog for more soon! học ielts hà nội

    ReplyDelete
  36. A bewildering web journal I visit this blog, it's unfathomably heavenly. Oddly, in this present blog's substance made purpose of actuality and reasonable. The substance of data is informative
    Oracle Fusion Financials Online Training
    Oracle Fusion HCM Online Training
    Oracle Fusion SCM Online Training

    ReplyDelete
  37. An astounding web diary I visit this blog, it's inconceivably magnificent. Strangely, in this current blog's substance made point of fact and sensible. The substance of information is instructive.
    Oracle Fusion Financials Online Training
    Oracle Fusion HCM Online Training
    Oracle Fusion SCM Online Training

    ReplyDelete
  38. This comment has been removed by the author.

    ReplyDelete
  39. Good to see such blog information very excited
    Sanjary Kids is one of the best play school and preschool in Hyderabad,India. The motto of the Sanjary kids is to provide good atmosphere to the kids.Sanjary kids provides programs like Play group,Nursery,Junior KG,Serior KG,and provides Teacher Training Program.We have the both indoor and outdoor activities for your children.We build a strong value foundation for your child on Psychology and Personality development.
    Preschool in hyderabad

    ReplyDelete
  40. An overwhelming web journal I visit this blog, it's unfathomably amazing. Unusually, in this present blog's substance made inspiration driving truth and reasonable. The substance of data is enlightening
    Oracle Fusion Financials Online Training
    Oracle Fusion HCM Online Training
    Oracle Fusion SCM Online Training

    ReplyDelete
  41. Nice posting blog information
    Best QA / QC Course in India, Hyderabad. sanjaryacademy is a well-known institute. We have offer professional Engineering Course like Piping Design Course, QA / QC Course,document Controller course,pressure Vessel Design Course, Welding Inspector Course, Quality Management Course, #Safety officer course.
    QA / QC Course in India

    ReplyDelete
  42. Such a nice blog, I really like what you write in this blog, I also have some relevant information about if you want more information.

    Oracle Fusion HCM Online Training
    Workday Online Training

    ReplyDelete

  43. Thanks for sharing useful information.. we have learned so much information from your blog..... keep sharing
    Oracle Fusion HCM Online Training

    ReplyDelete
  44. Good Information
    We are the best piping design course in Hyderabad, India. Sanjary academy Offers Piping Design Course and Best Piping Design Training Institute in Hyderabad. Piping Design Institute in India Piping Design Engineering.
    Piping Design Course
    Piping Design Course in india
    Piping Design Course in hyderabad

    ReplyDelete
  45. Nice Article
    Best QA / QC Course in India, Hyderabad. sanjaryacademy is a well-known institute. We have offer professional Engineering Course like Piping Design Course, QA / QC Course,document Controller course,pressure Vessel Design Course, Welding Inspector Course, Quality Management Course, #Safety officer course.
    QA / QC Course
    QA / QC Course in india
    QA / QC Course in hyderabad

    ReplyDelete
  46. Good Information
    "Yaaron media is one of the rapidly growing digital marketing company in Hyderabad,india.Grow your business or brand name with best online, digital marketing companies in ameerpet, Hyderabad. Our Services digitalmarketing, SEO, SEM, SMO, SMM, e-mail marketing, webdesigning & development, mobile appilcation.
    "
    Best web designing companies in Hyderabad
    Best web designing & development companies in Hyderabad
    Best web development companies in Hyderabad

    ReplyDelete
  47. I just loved your article on the beginners guide to starting a blog.If somebody take this blog article seriously in their life, he/she can earn his living by doing blogging.thank you for thizs article. TOP blockchain online training

    ReplyDelete
  48. This is most informative and also this post most user friendly and super navigation to all posts. Thank you so much for giving this information to me.salesforce developer training in bangalore

    ReplyDelete
  49. The development of artificial intelligence (AI) has propelled more programming architects, information scientists, and different experts to investigate the plausibility of a vocation in machine learning. Notwithstanding, a few newcomers will in general spotlight a lot on hypothesis and insufficient on commonsense application. Machine Learning Final Year Projects In case you will succeed, you have to begin building machine learning projects in the near future.

    Projects assist you with improving your applied ML skills rapidly while allowing you to investigate an intriguing point. Furthermore, you can include projects into your portfolio, making it simpler to get a vocation, discover cool profession openings, and Final Year Project Centers in Chennai even arrange a more significant compensation.


    Data analytics is the study of dissecting crude data so as to make decisions about that data. Data analytics advances and procedures are generally utilized in business ventures to empower associations to settle on progressively Python Training in Chennai educated business choices. In the present worldwide commercial center, it isn't sufficient to assemble data and do the math; you should realize how to apply that data to genuine situations such that will affect conduct. In the program you will initially gain proficiency with the specialized skills, including R and Python dialects most usually utilized in data analytics programming and usage; Python Training in Chennai at that point center around the commonsense application, in view of genuine business issues in a scope of industry segments, for example, wellbeing, promoting and account.

    ReplyDelete
  50. I just loved your article on the beginners guide to starting a blog.If somebody take this blog article seriously in their life, he/she can earn his living by doing blogging.thank you for thizs article. best blockchain online training

    ReplyDelete
  51. Nice post. Thanks for sharing! I want people to know just how good this information is in your blog. It’s interesting content and Great work.
    machine learning courses
    data science course in hyderabad
    business analytics courses in hyderabad

    ReplyDelete
  52. If you are stuck with your Management assignment then in this case you can opt for our Management Assignment. we provide the bestOnline home work.We also provideLeadership Assignment Help for students across the globe. for more information contact us +16692714848.

    ReplyDelete
  53. Tekniko Global provides mobile app development company in noida for iPhone, iPad, Android, Blackberry & Windows 7 platforms including Xamarin for cross platform mobile development.
    mobile app development company in noida

    ReplyDelete

  54. Fantastic blog. Great piece of information. Very informative. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Thanks for sharing this with us.
    Today For Website and Mobile Apps website development company in delhi
    ecommerce website development company in delhi

    ReplyDelete
  55. Thanks for Sharing This Article.It is very so much valuable content. I hope these Commenting lists will help to my website
    blockchain online training
    best blockchain online training
    top blockchain online training

    ReplyDelete
  56. I'm glad to locate this say very mind blowing and cheerfully for everyone. That's Great & Giving so much different subjects information after reading your articles. Really I am heartily agreed with this article and, Thanks and share more. assignment help in australia -
    Assignment Help Melbourne -
    Assignment Help Perth

    ReplyDelete
  57. Really an awesome article, love reading this as it was very attractive and helpful. Please keep posting such articles.
    Best Hotels in Mussoorie
    VRINDAVAN- “Brindaban”
    Luxury Hotel Mussoorie
    National News in Hindi

    ReplyDelete
  58. That's an incredibly useful post. Thanks alot for your afforts. I would be glad If you get time to read my article. Thanks in advance
    Anaplan Training

    ReplyDelete
  59. Thank you for taking the time and sharing this information with us. It was indeed very helpful and insightful while being straight forward and to the point.

    AWS cloud training in Gurgaon
    FullStack Development Training in Gurgaon
    Angularjs Training in Gurgaon

    ReplyDelete
  60. Interesting stuff to read and useful to improve knowledge.
    Keep posting.
    your article is so convincing.
    Thanks for posting.
    Also Check out
    Top hill stations of india
    Best Valley View Hotel of Mussoorie
    reasons to visit mussoorie
    Latest International News

    ReplyDelete
  61. here you can get more information about joining the pakistan navy
    https://joinpaknavy.site/

    ReplyDelete
  62. Thanks for the best blog ever about salesforce training

    We provide the best anaplan training in india with best & experienced faculty and also real time projects included

    ReplyDelete
  63. My Assignment Help online is the hand-picked assignment help company offering most reliable Assignment Help service to students residing in Australia. Our team of writers are available 24×7 to provide professional academic writing service for assignments, essays, coursework and many more.

    ReplyDelete
  64. Do you need help with academic writing services online? Our best online assignment writers offer assignment help online.

    ReplyDelete
  65. Looking for a professional for your Coursework help then we are just a click away, visit our website and get the best help for your Coursework writing at a very cost effective price.

    ReplyDelete
  66. I really appreciate the kind of topics you post here. Thanks for sharing us a great information that is actually helpful. Good day!

    DevOps Training in Hyderabad

    ReplyDelete
  67. I read your post. It is very informative ad helpful to me. I admire the message valuable information you provided in your article.
    power bi training

    ReplyDelete
  68. I am sure it will help many people. Keep up the good work. It's very compelling and I enjoyed browsing the entire blog. We are also providing the best services click on below links to visit our website.
    Snowflake Training
    Workday Training
    Okta Training
    AEM Training
    CyberArk Training

    ReplyDelete


  69. Hi, thankful for your shared and valuable story for making the smartness in the relative subject. Over time, I triode to read different subject. I am interested to feel free to subscribe your new post. I highly urge to take our service and connect us to Assignment Help .

    ReplyDelete
  70. Wow! This was an incredibly wonderful post. Many thanks for providing these details. will be sent or send

    ReplyDelete
  71. Your website helps me a lot in my work. I am also a web developer like you but my website is aimed at entertainment with fun games. Click the link below to go to my site and explore it.

    friday night funkin download

    fnf download download

    ReplyDelete
  72. Assignment help is the best way to get your work done on time. The task of writing an assignment can be difficult, especially if you are not good at writing. You may find it hard to come up with a thesis statement or even know where to start. The best way to get your assignment done on time is to Buy assignment professional help from expert writers.

    ReplyDelete
  73. Stop thinking where to hire essay writing service Malaysia and go to Malaysiaassignmenthelp.com for the best essay writing service and have your essays completed by expert academic writers in the correct format.

    ReplyDelete
  74. تنفرد شركة انجزني كبري شركات نقل الاثاث في مصر بعدد العمالة التي تقوم بعملية تغليف الاثاث على أكمل وجه، فلن تكون بحاجة للتواصل مع أحد الشركات المتخصصة في بيع الكراتين وتنفق كثير من الأموال حول جلب أنواع من المواد الخاصة بالتغليف، فكل ما يمكنك فعله هو التواصل مع شركة انجزني الشركة الرائدة في هذا المجال التي تتيح لك خدمة نقل وتغليف ممتازة.

    ReplyDelete
  75. تفاوت أسعارونش رفع اثاث  من شركة لأخرى، هذا بالإضافة إلى اختلاف التكلفة تبعا للأدوار التي يصل إليها الونش، لكن اذا اردت ان تحصل علي اقل تكلفة تعامل مع شركة السلطان لانها الافضل والارخص في المجال علي الاطلاق.

    ReplyDelete