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!!

73 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. Thanks for sharing a good information about salesforce . .......This article is very useful to learners. Sales force online training

    ReplyDelete

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

    ReplyDelete
  12. 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
  13. 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
  14. This is very useful informative blog.Thanks for shairng information.To get the details about
    Central Government jobs TamilNadu state 2017-18

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

    ReplyDelete
  16. Awesome,
    Thank you so much for sharing such an awesome blog...
    iphone training classes in bangalore

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

    ReplyDelete
  18. 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
  19. A very helpful blog on surge protection device, I am having this device at my home and also at my office. It is efficiently running since 3 years. No problems as previous was.

    ReplyDelete
  20. Really it was an awesome article...very interesting to read..You have provided an nice article....Thanks for sharing..
    Android Training in Chennai
    Ios Training in Chennai

    ReplyDelete
  21. 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
  22. Really Good blog post.provided a helpful information.I hope that you will post more updates like this salesforce Online Training Hyderabad

    ReplyDelete
  23. 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
  24. These blog is conveys a useful information to viewers. I like your article is nice.

    Selenium Training in Chennai

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

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

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

    ReplyDelete
  28. "• 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
  29. 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
  30. myTectra Placement Portal is a Web based portal brings Potentials Employers and myTectra Candidates on a common platform for placement assistance

    ReplyDelete
  31. 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
  32. 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
  33. Thanks for sharing valuable information in the article.students can make a good career by learning Oracle Fusion SCM Online Training.

    Oracle Fusion SCM Online Training

    ReplyDelete
  34. 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
  35. 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
  36. Hey Really Thanks for sharing the best information regarding oracle,hope you will write more great blogs.
    Oracle Fusion Financials Online Training

    ReplyDelete
  37. 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
  38. 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
  39. Great post and informative blog.it was awesome to read, thanks for sharing this great content to my vision.

    CEH Training In Hyderbad

    ReplyDelete
  40. Amazing web journal I visit this blog it's extremely marvelous. Interestingly, in this blog content composed plainly and reasonable. The substance of data is educational.
    Oracle Fusion Financials Online Training
    Oracle Fusion HCM Online Training
    Oracle Fusion SCM Online Training

    ReplyDelete
  41. 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
  42. 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
  43. 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
  44. 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

  45. Flipkart CashBack Offers June 2018 - SBI, HDFC, ICICI, Citibank Cards

    Best of Home Furnishing min 40% off:
    flipkart Mobile Accessories


    flipkart axis cashback offer,
    flipkart discount coupon codes, flipkartcashbackoffers,flipkart sbi cashback offers, flipkart cashback offers on mobiles,big billion day offers flipkart cashback, cashback offers flipkart, flipkart exchange offers on mobiles, flipkart cashback, flipkart cashback june,flipkart cashback offers, flipkart offers toady,flipkart bank cashback offer, flipkart cashback offers on watches, flipkart cashback offers on fashion, flipkart big billion day cashback offers, flipkart cashback may, flipkart big billion day offers 2017, flipkart deal of the day offers, flipkart christmas cashback offers, flipkart hdfc cashback, flipkart hdfc cashback offers, flipkart coupons, flipkart offers, flipkart offers cashback, flipkart offers 2017, flipkart axis bank offer, flipkart cashback february, flipkart cashback offers on washing, flipkart big billion day offers, flipkart hdfc cashback on electronics,flipkart offers on moblies, flipkartcashbackoffers, flipkart citi bank offers, flipkart cashback april, flipkart daily offers, flipkart yes cashback offer, flipkart today offers, flipkart discount offers on kitchen, flipkart cashback on home appliances, flipkart discount offers, flipkart deals today, flipkart cashback on mobiles, flipkart cashback offers on sarees, flipkart hdfc offer, flipkart cashback january, flipkart cashback offers on home, flipkart phonepe cashback offer, flipkart credit card offers, flipkart republic day sale offers, flipkart promo codes, flipkart cashback on refrigerators, flipkart upcoming offers in 2018, flipkart sbi offers, flipkart hdfc offer on mobiles,flipkart sbi offer cashback, flipkart debit card offers, flipkart phonepe offers, flipkart cashback coupons, flipkart citi bank offer, flipkart coupons 2018, flipkart citi bank offer on electronics, flipkart cashback on air conditioners, flipkart mobiles offers, flipkart iphone offers, flipkart hdfc bank offers, flipkart offers today, flipkart discounts on laptops flipkart exchange offers, flipkart sbi cashback offer, big trillion day offers flipkart ,flipkart citi bank cashback offers, flipkart cashback offers 2018, flipkart hdfc offers flipkart axis bank offers, flipkart air conditioner offers flipkart offers on televisions, flipkart refrogiratiors offers, flipkart sbi offer, flipkart daily deals, flipkart phonepe cashback offers, flipkart cashback offers, flipkart offers on laptops, flipkart new year cashback offers, flipkart emi offers, flipkart sbi offers on electronics


    flipkart cashback offers,cashbackcoupons,cashbackoffer,cashbackofferscoupons,flipkarthdfcoffer,
    MyDealsAndCoupons,flipkart cashback offers,cashbackcoupons,flipkartcashbackoffers,cashbackoffer,cashbackofferscoupons,flipkarthdfcoffer,latestcashbackoffers,flipkartcreditcardoffers,dealsncashbackcashbackoffers


    Flipkart CashBack Offers,telugu bloggers ,telugu websites
    Flipkart CashBack Offers - SBI, HDFC, ICICI, Citibank Cards,flipkart sbi debit card emi,flipkart upcoming offers on mobiles,flipkart credit card,flipkart cashback phonepe,flipkart credit card generator,flipkart cashback offer phonepe,flipkart american express,india fake debit card generator,flipkart american express gift card,sbi credit card offers on flipkart today,sbi flipkart offer,sbi debit card offers cash back,sbi flipkart offer 2018,,telugu bloggers ,telugu websites

    ReplyDelete
  46. flipkart icici bank offer,
    flipkart icici cash back,flipkart icici coupon code,flipkart icici credit card,flipkart icici discount coupon,flipkart icici netbanking offer,flipkart icici offer,

    icici bank card offer on flipkart,icici bank cashback offer on flipkart,icici bank credit card
    flipkart offer,icici bank credit card offer flipkart,icici bank credit card offers on flipkart,icici bank debit card offers on flipkart,icici bank flipkart offer,icici bank flipkart offer 2016,icici bank flipkart vouchers,icici bank offer for flipkart,icici bank offers flipkart,icici card offers on flipkart,icici cash back offer on flipkart,icici coupon code for flipkart,
    icici credit card cash back offer on flipkart,icici credit card coupon code flipkart,icici credit card discount on flipkart,icici credit card flipkart,icici credit card offers flipkart,icici credit card offers in flipkart,icici credit card offers on flipkart,icici debit card flipkart offer,icici debit card offers in flipkart,icici debit card offers on flipkart,icici discount on flipkart,icici flipkart discount,icici net banking offers on flipkart,icici offer for flipkart



    flipkart icici,
    flipkart icici debit card emi,flipkart icici offer,flipkart icici credit card offer,flipkart offers for icici credit card,flipkart icici debit card offer,flipkart emi on icici debit card,flipkart icici bank offer,flipkart icici offer 2018,flipkart icici emi,flipkart icici bank debit card emi,flipkart coupons for icici debit card,icici flipkart gift voucher,flipkart icici coupon,flipkart icici coupon code,flipkart offer with icici bank,flipkart icici cashback offer,flipkart icici bank,flipkart icici offer 2017,icici bank flipkart gift voucher,icici pockets flipkart

    flipkart icici bank offer,
    flipkart icici cash back,flipkart icici coupon code,flipkart icici credit card,flipkart icici discount coupon,flipkart icici netbanking offer,
    flipkart icici offer,icici bank card offer on flipkart,icici bank cashback offer on flipkart,icici bank credit card flipkart offer,icici bank credit card offer flipkart,icici bank credit card offers on flipkart,icici bank debit card offers on flipkart,icici bank flipkart offer,icici bank flipkart offer 2016,icici bank flipkart vouchers,icici bank offer for flipkart,icici bank offers flipkart,icici card offers on flipkart,icici cash back offer on flipkart,icici coupon code for flipkart,icici credit card cash back offer on flipkart,icici credit card coupon code flipkart,icici credit card discount on flipkart,icici credit card flipkart,icici credit card offers flipkart,icici credit card offers in flipkart,icici creditcardoffers on flipkart,icici debit card flipkart offer,icici debit card offers in flipkart,icici debit card offers on flipkart,icici discount on flipkart,icici flipkart discount,icici net banking offers on flipkart,icici offer for flipkart,flipkart icici,flipkart icici debit card emi,flipkart icici offer,flipkart icici credit card offer,flipkart offers for icici credit card,flipkart icici debit card offer,flipkart emi on icici debit card,flipkart icici bank offer,flipkart icici offer 2018,flipkart icici emi,flipkart icici bank debit card emi,flipkart coupons for icici debit card,icici flipkart gift voucher,flipkart icici coupon,flipkart icici coupon code,flipkart offer with icici bank,flipkart icici cashback offer,flipkart icici bank,flipkart icici offer 2017,icici bank flipkart gift voucher,icici pockets flipkart,

    ReplyDelete
  47. 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
  48. This comment has been removed by the author.

    ReplyDelete
  49. 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
  50. 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