• mpoirier
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 9
    Replies

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,

 

 

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

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

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 !

 

 

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

 

 

 

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 ! 

 

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 !

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 !

 

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

 

 

 

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,

 

 

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

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

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 !

 

 

 

 

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 ! 

 

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 !

 

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

 

 

 

Using the page attribute render-as="pdf" is giving me a monochrome PDF despite the use of CSS on the page to set the background-color in some table cells. The background colors render fine in HTML but are absent in PDF. Is it possible to get color in the PDF (color fidelity not an issue)?
  • December 09, 2008
  • Like
  • 0