-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
9Questions
-
9Replies
Formating double as currency
The string.format() method listed in the Apex Documentation does not work.
This (and every other combinations I tried) generate a compile error 'method does not exist or wrong signature' !
<code>
double subTotal = 1000.0;
strind s = string.format('{0,number,currency}', subTotal);
</code>
Is there a way to do such a basic formating using APEX ?!?
Thanks,
-
- mpoirier
- October 09, 2009
- Like
- 0
- Continue reading or reply
Formula evaluation
Hi,
When does formula evaluation happens ?
Can I assume that formula fields are already evaluated if I want to use their content in triggers ?
Where can I find documentation about this ?
Thanks !
Michel
-
- mpoirier
- July 28, 2009
- Like
- 0
- Continue reading or reply
The Chicken or the Egg
Hi !
I want to rename a sObject and all our custom classes, etc.
Is there a way to "Refactor" this in SalesForce ?
If I change the object name, error: "Existing references prevent save"
If I replace object names in classes, etc, error: "Object does not exists"
I am also trying to do it in Eclipse but without success...
Thanks !
Michel
-
- mpoirier
- June 22, 2009
- Like
- 0
- Continue reading or reply
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 !
-
- mpoirier
- June 17, 2009
- Like
- 0
- Continue reading or reply
Searching Pricebook Entries
I had code that searched the Product2 object.
I changed this code to use the Pricebook instead but now the FIND command does not seem to work on this object.
It never returns with PB Entries...
This code works:
pricebookEntries = [SELECT id, IsActive, Name, Product2Id, ProductCode, UnitPrice, UseStandardPrice from PricebookEntry WHERE (Pricebook2Id = :opp.Pricebook2Id) AND (IsActive = True) ORDER BY ProductCode];
This code does not work:
pricebookEntries = (List<PricebookEntry>)[FIND :searchText IN ALL FIELDS RETURNING PricebookEntry (id, IsActive, Name, Product2Id, ProductCode, UnitPrice, UseStandardPrice WHERE (Pricebook2Id = :opp.Pricebook2Id) AND (IsActive = True))][0];
Similar queries worked on the Product2 object...
I know there are special settings on the PriceBook to make it not visible in the web interface.
Is there a restriction on the PriceBook objects that prevent a text search to work on those objects ?
Thanks for any hint on this...
Michel
-
- mpoirier
- June 17, 2009
- Like
- 0
- Continue reading or reply
Page .getParameters()
This does not work:
Map<String,String> req = ApexPages.currentPage().getParameters();
System.debug.(Logginglevel.INFO, req.size.format);
for (String s:req)
{
System.debug(s);
}
I get this error message:
Error: Compile Error: Initial term of field expression must be a concrete SObject: MAP:String,String at line x column x |
What does that mean ?
"currentPage().getParameters()" is supposed to return a "Map<String,String>"...
Also, is there a way to format the debug output a little bit so it is more readable ? It displays in one big string in the Console right now...
Thanks !
-
- mpoirier
- June 15, 2009
- Like
- 0
- Continue reading or reply
Selecting Product2 items
Hi,
I want to display a table of Product2 items ( List<Product2> ) for selection with a checkbox.
There is no field in the Product2 object for "Selected" item...
Do I actually need to permanently add a "selected" field to the Product2 object ?
Or is there a way that I can temporarily add a checkbox in the table for selection retrieval ?
Thanks !
-
- mpoirier
- June 15, 2009
- Like
- 0
- Continue reading or reply
Adding a extra field in standard object ?
Hi,
I want to display a table of Product2 items (List<Product2>) for selection with a checkbox.
There is no field in the Product2 object for "Selected" item...
Do I actually need to permanently add a "selected" field to the Product2 object ?
Or is there a way that I can temporarily add a checkbox in the table for selection retrieval ?
Thanks !
-
- mpoirier
- June 15, 2009
- Like
- 0
- Continue reading or reply
New Quote App in development ?
Hi,
I am new here and to SalesForce environment.
I have been assigned to modify the "Sales Quotes with Line Items" application.
Since it is built with sControls, I planned on rewriting it using VisualForce pages...
Before I start spending more time than I should on this, I am wondering if someone is already updating this package at Force.com Labs... (?)
Thanks !
Michel
-
- mpoirier
- June 12, 2009
- Like
- 0
- Continue reading or reply
Formating double as currency
The string.format() method listed in the Apex Documentation does not work.
This (and every other combinations I tried) generate a compile error 'method does not exist or wrong signature' !
<code>
double subTotal = 1000.0;
strind s = string.format('{0,number,currency}', subTotal);
</code>
Is there a way to do such a basic formating using APEX ?!?
Thanks,
- mpoirier
- October 09, 2009
- Like
- 0
- Continue reading or reply
Formula evaluation
Hi,
When does formula evaluation happens ?
Can I assume that formula fields are already evaluated if I want to use their content in triggers ?
Where can I find documentation about this ?
Thanks !
Michel
- mpoirier
- July 28, 2009
- Like
- 0
- Continue reading or reply
The Chicken or the Egg
Hi !
I want to rename a sObject and all our custom classes, etc.
Is there a way to "Refactor" this in SalesForce ?
If I change the object name, error: "Existing references prevent save"
If I replace object names in classes, etc, error: "Object does not exists"
I am also trying to do it in Eclipse but without success...
Thanks !
Michel
- mpoirier
- June 22, 2009
- Like
- 0
- Continue reading or reply
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 !
- mpoirier
- June 17, 2009
- Like
- 0
- Continue reading or reply
Page .getParameters()
This does not work:
Map<String,String> req = ApexPages.currentPage().getParameters();
System.debug.(Logginglevel.INFO, req.size.format);
for (String s:req)
{
System.debug(s);
}
I get this error message:
Error: Compile Error: Initial term of field expression must be a concrete SObject: MAP:String,String at line x column x |
What does that mean ?
"currentPage().getParameters()" is supposed to return a "Map<String,String>"...
Also, is there a way to format the debug output a little bit so it is more readable ? It displays in one big string in the Console right now...
Thanks !
- mpoirier
- June 15, 2009
- Like
- 0
- Continue reading or reply
Adding a extra field in standard object ?
Hi,
I want to display a table of Product2 items (List<Product2>) for selection with a checkbox.
There is no field in the Product2 object for "Selected" item...
Do I actually need to permanently add a "selected" field to the Product2 object ?
Or is there a way that I can temporarily add a checkbox in the table for selection retrieval ?
Thanks !
- mpoirier
- June 15, 2009
- Like
- 0
- Continue reading or reply
New Quote App in development ?
Hi,
I am new here and to SalesForce environment.
I have been assigned to modify the "Sales Quotes with Line Items" application.
Since it is built with sControls, I planned on rewriting it using VisualForce pages...
Before I start spending more time than I should on this, I am wondering if someone is already updating this package at Force.com Labs... (?)
Thanks !
Michel
- mpoirier
- June 12, 2009
- Like
- 0
- Continue reading or reply
Render-as PDF: Where'd the colors go?
- pj6284
- December 09, 2008
- Like
- 0
- Continue reading or reply