You need to sign in to do that
Don't have an account?
mpoirier
Extending SalesForce objects
I need to have a Boolean 'selected' field to display a checkbox in a pageBlockTable.
Please tell me I can do this:
public class ibPricebookEntry extends PricebookEntry { Boolean selected; public Boolean getSelected() { return selected; } public void setSelected(Boolean s) { selected = s; } }
Right now, I get this message at compile time:
Error: Compile Error: addProductsToQuote.ibPricebookEntry: Non-exception class must extend another user-defined non-exception class: PricebookEntry |
Anything else special I need to add to my custom class ?
I hope I do not need to add a Boolean field in the PricebookEntry object !
You use the following link for displaying the checkboxes.
http://wiki.developerforce.com/index.php/Checkbox_in_DataTable
All Answers
I think you can only extend custom classes, not standard object classes.
You could embed your standard object in the custom class, a little messier, but might work for you.
public class ibPricebookEntry { Boolean selected {get; set;} PricebookEntry pbe {get; set;} }
You use the following link for displaying the checkboxes.
http://wiki.developerforce.com/index.php/Checkbox_in_DataTable
Beautiful !
Thanks, Srini !!!