Salesforce Context Menu for list views

Tuesday, May 20, 2014 by Aslam - The Alexendra
Hi All,
This is a quick demo for a utility component. I designed it for standard salesforce list views. Its a kind of context menu which can be opened on clicking of a IMAGE formula field. You can show your useful menu options in this context menu. Each option can have the record id automatically by JS, so that your target page or screen can have proper processing based on passed record id.

How to configure:
  1. Make a IMAGE formula field as given in screeshot above
  2. Upload the file available on this url
  3. Make one home page component (HTML type and Narrow side)
  4. Put below code in that component
<!-- include files --> <script src="/resource/1400648652000/dupedetector__menu_resources/menu-resources/jquery.min.js"></script> <link rel="stylesheet" href="/resource/1400648652000/dupedetector__menu_resources/menu-resources/menu.css"> <!-- HTML Menu --> <div class="dropdown-menu" id="dropdown-menu"> <a href="/003?rlid=RelatedContactList&amp;id=" target="_BLANK"> <img src="/resource/1400648652000/dupedetector__menu_resources/menu-resources/application_view_detail.png" /> Sync Contacts </a> <a href="/006?rlid=RelatedOpportunityList&amp;id=" target="_BLANK"> <img src="/resource/1400648652000/dupedetector__menu_resources/menu-resources/calendar-disabled.png"> Export Orders</a> <a href="/005?rlid=RelatedCaseList&amp;id=" target="_BLANK"> <img src="/resource/1400648652000/dupedetector__menu_resources/menu-resources/zip.png"/> View Cases </a> <div class="break"></div> <a href="/_ui/core/chatter/ui/ChatterPage" target="_BLANK"> <img src="/resource/1400648652000/dupedetector__menu_resources/menu-resources/connect_light_small_short.gif"/> Sync Feeds</a> <a href="00T?rlid=RelatedActivityList&amp;id=" target="_BLANK"> <img src="/resource/1400648652000/dupedetector__menu_resources/menu-resources/phone.png"/> Calls History </a> <a href="/002?parent_id=001900000054UZ7&amp;id=" target="_BLANK"> <img src="/resource/1400648652000/dupedetector__menu_resources/menu-resources/3668432.png"/> Box.Net Documents </a> <a href="00T?rlid=RelatedActivityList&amp;id=" target="_BLANK"> <img src="/resource/1400648652000/dupedetector__menu_resources/menu-resources/feature_gmail_icon.gif"/> Google Mails </a> <div class="break"></div> <a href="00T?rlid=RelatedActivityList&amp;id=" target="_BLANK"> <img src="/resource/1400648652000/dupedetector__menu_resources/menu-resources/delete.png"/> Delete Logs </a> </div> <!-- JS Part --> <script> function init_sfdc_menu(){ $('.x-grid3-col-00N9000000A4pIp').click(function(event){ event.stopPropagation(); var id = $(this).attr("id").split("_")[0]; $('.dropdown-menu').css( {position:"absolute", top:event.pageY-100, left: event.pageX-30}); $('.dropdown-menu').find('a').each(function(){ var oldhref = $(this).attr("href"); oldhref = oldhref.substring(0,oldhref.lastIndexOf('=')+1); $(this).attr("href", oldhref + id); }); $('.dropdown-menu').show(); }); $(document).click(function(){ $('.dropdown-menu').hide(); }); } $(document).ready(function(e) { $('#bodyCell').bind('DOMNodeInserted DOMNodeRemoved', function(event) { setTimeout(init_sfdc_menu(),500); }); }); </script>

I have designed this component for just showing how to use this utility, so i have not make it very robust or optimize and have left few hard coded ids few places, but any developer who needs to make it work proper, needs to do following changes in files:
  •    Open the menu.css and change hard coded id "00N9000000A4pIp" to your image formula field id on list view
  •    Change the same id available on component code
  •    Once you uploaded your static resource, you will get one timestamp for that which you can see in my component code few places, you need to change it with yours as well and make sure you provide proper url, for example my url for jquery.js is this:
   You need to change this url with yours.
Here is a screencast you can see how it works.

Email if for any issue, happy coding :)

Aslam Bari


Unknown said...

Cool! Looking forward to implement.

Pravesh Rana said...

Nice. Thanks for sharing

Unknown said...

Excellent! Thanks

Abdul Vahid said...


Raghvendra Rathore said...

Great job sir...
I implemented it today. Now enhancing according to my need.
Thanks to share...

viswa said...

Great Sharing for us,Thanks for sharing information. I really liked it.

Unknown said...

It’s very Informative Blog Thanks for sharing with us. Its opportunity is so fantastic and working style so speedy. I think it may be help all of you. Thanks.
Interracial Match Making
Interracial Dating

TheAnonPirate said...

This is awesome! thanks man! Following your blog!

CodeFrux Technologies said...

This is Awesome Blog !

Salsforce Course Materials

Unknown said...

This is also a very good post which I really enjoyed reading. It is not everyday that I have the possibility to see something like this.
i like play games friv4 online and play games 2 girls Download baixar facebook movel

Unknown said...

Thanks for sharing. I hope it will be helpful for too many people that are searching for this topic.
download descargar facebook messenger and download free descargar facebook para android , descargar facebook gratis , descarga facebook

Unknown said...

This is also a very good post which I really enjoyed reading. It is not everyday that I have the possibility to see something like this.
download free descargar whatsapp gratis and download baixar whatsapp gratis online and descargar whatsapp , baixar whatsapp

Unknown said...

Very helpful advice in this particular post! It’s the little changes that make the largest changes. Thanks for sharing!
Jugar juegos de frozen en línea gratis, los nuevos de princesa de Disney juegos frozen - la princesa encantadora y linda. Divertirse frozen!

Unknown said...

Thanks for sharing this quality information with us. I really enjoyed reading. I think I need it.
Games for girls|
Kizi 1|
Kizi 2

Unknown said...

I am impressed by the quality of information on this website. There are a lot of good resources here. I am sure I will visit this blog again soon.
happy wheels
super mario bros

bibikafu said...

Thanks for your great article friend, i get new information, new ideas to do somethings, i hope you will share again, i keep waiting for next post, thanks.
Friv 4
Kizi 3

Unknown said...

Thanks for sharing your info. I really appreciate your efforts and I will be waiting for your further write.
Friv 10

Unknown said... is not found in the given url

Yepi said...

You need to kill time, you need entertainment. Refer to our website. hope you get the most comfort.
Thanks you for sharing!
Friv Games

tranbaongoc said...

You are stressed and tired, you need entertainment. Refer to our website. hope you get the most comfortable.
Kizi 4

ffff said...

you'd have time to look these kids active. Please visit our website and let us play the game interesting.
Thanks for sharing !
Friv 10
Kizi 10
Yepi 2

Unknown said...

You need to kill time, you'd have time to look these kids active. Refer to our website. Hope you get the most comfort.
Thanks for sharing !
Friv 5
Kizi 1
Yepi 3

Unknown said...

I would very much like to agree with the previous commenter! I find this blog really useful for my uni project. I hope to add more useful posts later.

tranthuphuong said...

thank you for your interest in welcome visit
Friv 4

tranduyphong said...

New attractive game . I will play it every day
Friv 2

Friv4 said...

When you're tired, you want to relax after a stressful working hours, you need to have time to take care of the kids active.
Please visit our website and play exciting flash games.Thanks you for sharing!
Friv 4

kanchana said...

Truely a very good article on how to handle the future technology. After reading your post,thanks for taking the time to discuss this, I feel happy about and I love learning more about this topic. keep sharing your information regularly for my future reference. This content creates a new hope and inspiration with in me. Thanks for sharing article like this. The way you have stated everything above is quite awesome. Keep blogging like this. Thanks.
Java training in chennai

Kizi200 said...

Play the Best Free Games! We've picked out the racing games, cooking games, candy crush, games shooting, fashion games, ...
Thanks for sharing !
Kizi 200
Friv 1

Abaxsoft Solution said...

Very informative article and thanks for information...Really enjoy while reading

GirlsGoGames Dressup said...

You want to relax after a stressful working hours. Refer to our website. Hope you get the most comfort.
Thanks for sharing !
Kizi 100

Suseela said...

That is very interesting; you are a very skilled blogger. I have shared your website in my social networks..!

Digital Marketing Services in Chennai

Digital Marketing Company in Chennai

games2girls said...

You need to have time to take care of the kids active. Please visit our website and play exciting flash games.
Thanks you for sharing!
Kizi 1000
Friv 3

Unknown said...

Thanks for sharing the information. It is very useful for my future. keep sharing. Can you play more games at: Friv 10 | Kizi 4 | happy wheel

Unknown said...

The blog or and best that is extremely useful to keep I can share the ideas. Age Of War 2
Big Farm | Slitherio | Tank Trouble
Of the future as this is really what I was looking for, I am very comfortable and pleased to come here. Thank you very much.
Happy Wheels | Goodgeme Empire |

Unknown said...

Thanks for sharing this good stuff! Keep up the great work, we look forward to reading more from you in the future!
Friv 100

Unknown said...

You want to relax after a stressful working hours. Refer to our website. Hope you get the most comfort.
Thanks for sharing !
Kizi 100
gold Miner 2
unfair Mario 2
cubefield 2
tanki Online 2

Friv Games
Friv 200

Sindhuja Ravi said...

Superb. I really enjoyed very much with this article here. Really it is an amazing article I had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article.thank you for sharing such a great blog with us. expecting for your..
SEO Company in India

Unknown said...

Finding the time and actual effort to create a superb article like this is great thing. I’ll learn many new stuff right here! Good luck for the next post buddy..
SEO Company in Chennai

jjang said...

Your article is very good.thank you very much.
Juegos Friv 4
Kizi 1000

Unknown said...

This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.I like it and help me to development very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.
Fresher Jobs
Fresher Openings

subuvenni said...

i really like this blog.And i got more information's from this blog.thanks for sharing!!!!
Digital Marketing Company in Chennai

Unknown said...

This is extremely helpful info!! Very good work. Everything is very interesting to learn and easy to understood.


Unknown said...

Friv 2017 is new flash games which are expected to be the best Friv 4 games to play. You can find all game Friv 4 school free in Friv 2017 and Friv 4 School .
friv Games
Friv 2017
tủ nấu cơm
máy làm Ðá
friv 2018
friv 4

Unknown said...

Its really an Excellent post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog. Thanks for sharing....

Restaurant in OMR
Apartments in OMR
Villas in OMR
Resorts in OMR

CIITNOIDA - Best Oracle and linux training institute in noida delhi ncr said...

Best B Tech college in Delhi
Best B Tech college in Noida
Best B Tech college in Gurgaon
Best B Tech college in UP
Best B Tech college in India
Best B Tech college in Hyderabad
Best B Tech college in Chennai
Best B Tech college in Bangalore
Best B Tech college in Pune

Unknown said...

I have really happy to these reading your post. This product control and maintenance of our health.The daily routine can assist you weight lose quickly and safely.My life is completely reworked once I followed this diet.I feeling nice concerning myself.

Herbalife in Chennai
Nutrition centers in Chennai
Weight Loss in Chennai
Weight Gain in Chennai

Post a Comment