You need to sign in to do that
Don't have an account?
llisa
Disable single Custom button.
I have 4 custom buttons with differentionality.i.e
1. Edit
2. Send to Customer
3.Create pdf
4.Rebate
The senario is if there is no pdf in the custom detail page the "Send to Customer" button is disables else if at least one pdf is there this button is enable.Please some one help me.
here i declare a boolean-
public class Controller
{
public List<Attachment> attachments{get;set;}
public Boolean sendbutton{get;set;}
public Controller(ApexPages.StandardController controller)
{
if (attachments.size()>0)
{sendbutton=True;}
//other codes
}
}
it throws an error--Attempt to de-reference a null object
An unexpected error has occurred. Your development organization has been notified.
1. Edit
2. Send to Customer
3.Create pdf
4.Rebate
The senario is if there is no pdf in the custom detail page the "Send to Customer" button is disables else if at least one pdf is there this button is enable.Please some one help me.
here i declare a boolean-
public class Controller
{
public List<Attachment> attachments{get;set;}
public Boolean sendbutton{get;set;}
public Controller(ApexPages.StandardController controller)
{
if (attachments.size()>0)
{sendbutton=True;}
//other codes
}
}
it throws an error--Attempt to de-reference a null object
An unexpected error has occurred. Your development organization has been notified.
public class Controller
{
public List<Attachment> attachments{get;set;}
public Boolean sendbutton{get;set;}
public Controller(ApexPages.StandardController controller)
{
Id recId = controller.getId();
attachments = [SELECT Id FROM Attachment WHERE ParentId =: recId ];
if (attachments.size()>0)
{sendbutton=True;}
//other codes
}
}
www.infallibletechie.com
Thanks for your Reply. but it is throwing an error i.e- Attempt to de-reference a null object