Monday 10 March 2014

yes/no confirm pop up dialog box using jquery.





Hi Guys,

I am writing this post because some one comment on my blog and asked me for this requirement, i am happy to help him,

http://anuragsfdc.blogspot.in/p/salesforce-limits.html

his requirement is to show Yes /No buttons in place of Ok/Cancel buttons of javascript confirm function.

so for this i am creating a custom pop up dialog using JQuery.

here the code for same:-

here the screen shot:-


hope it helps, happy coding...

Thanks

3 comments:

  1. This is great, thank you for posting! I have another project I'm stumped on, maybe you could advise? Adding a detail page button that uses the search functionality to create a Find Duplicates Button on Contacts. Below is the code I'm using. However, I'm getting the following syntax error message: "The Name field is required". Mind helping me troubleshoot? Any advise greatly appreciated. Best, Brooks

    /_ui/search/ui/UnifiedSearchResults?searchType=2&str=
    {!IF( ISNULL(Contact.Phone) ,'',Contact.Phone &' or ' )}
    {!IF( ISNULL(Contact.MobilePhone) ,'',Contact.MobilePhone &' or ' )}
    {!Contact.FirstName}+{!Contact.LastName}
    +or+{!Contact.Email}

    ReplyDelete
    Replies
    1. Hi Brooks,

      i tried following code it working fine,

      window.open("/_ui/search/ui/UnifiedSearchResults?searchType=2&str={!IF( ISNULL(Contact.Phone) ,'',Contact.Phone &' or ' )}{!IF( ISNULL(Contact.MobilePhone) ,'',Contact.MobilePhone &' or ' )}{!Contact.FirstName}+{!Contact.LastName}+or+{!Contact.Email}","_self");

      please let me know if needs help.
      Thanks

      Delete
  2. Im a newbie , plz lend me your advise here ..
    On click of a custom button i need message to popup like xyz , but it should have ok or cancel option on that popup.. If ok then it should proceed to the operation , if cancel then just no action.

    The custom button already exists, behaviour - execute java scrip
    content source on click java script

    ReplyDelete