function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Deepak PansariDeepak Pansari 

I want custom "del" link in VF page , Any Idea ?

Hi,

 

I want to build custom page that has a link "del and Edit" like what we have in standerd detail list section of any objects like lead.

 

If Del link is clicked than i want one confirmation dialog box and after saying yes then records should be deleted.

 

I unable to create java script dialog box can some one any IDEA..:)

 

Thanks all,

Deepak 

Best Answer chosen by Admin (Salesforce Developers) 
TehNrdTehNrd

This should do the trick:

<apex:commandLink action="{!delete}" onclick="if(!confirm('WARNING: This will remove the selected item.')) return false;">
Delete
</apex:commandLink>

Credit for this goes to Jill Wetzler as she was the first person I've seen to post this cool trick.

 

-Jason

 

Message Edited by TehNrd on 08-31-2009 09:02 AM

All Answers

rcravenrcraven
Leave development to developers not consultants.
TehNrdTehNrd

This should do the trick:

<apex:commandLink action="{!delete}" onclick="if(!confirm('WARNING: This will remove the selected item.')) return false;">
Delete
</apex:commandLink>

Credit for this goes to Jill Wetzler as she was the first person I've seen to post this cool trick.

 

-Jason

 

Message Edited by TehNrd on 08-31-2009 09:02 AM
This was selected as the best answer
Deepak PansariDeepak Pansari

Thank you so much Jason and Jill :)

 

It is really helpfull.

 

-Deepak 

k2sfdevk2sfdev

onclick="return confirm('warning:')"