• gireeshz
  • NEWBIE
  • 0 Points
  • Member since 2006

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 57
    Replies

Hey there - this one goes out to the Salesforce devs that may be listening.  

 

We have a visualforce page that was written about a year ago which is basically a custom report exporting as PDF.   Suddenly, without any changes in page code, the page stopped working and is giving the dreaded 'internal server error' message withthe following code:

Error ID: 1183247688-671 (1462077656)

 

All the debug logs say that the page call succeeded and there is no indication of any error.  This has been submitted to support as #02660758. 

 

What can we do to try and understand what is actually causing this error??  Is there any way to get more information on the error detail?

 

Many Thanks! 

Hello - would like to get the community's opinion/input on this:

 

We are performing an implementation  where the user is requiring a large set of individual 'roll-up' fields on the Opportunity (and other) objects.  These fields are essentially summaries for fields on other objects that are related to the opportunity.  These objects are not master-detail, and actually may not be directly related (could be 2 objects away, for example).  After refactoring the object design as much as possible, it is not possible to bring things together nicely into master-detail relationships to use the Salesforce 'Roll-up Summary fields'.  (although Salesforce allowing 3-deep master detail relationships would go a long way)

 

So, when we decided how to implement this, we come up with the following two options: 

 

 

1)  Create 'mini', single-field Visualforce pages for each of these summaries that can be embedded into the Standard Opportunity page layout.  These pages would be for the standard 'Opportunity' controller but have a controller extension, lets call it 'oppFieldCalcs'.  Create the apex class 'oppFieldCalcs' to generate the values of each of these 'mini' visalforce pages/fields using SOQL statements, etc. as normal.  When the page loads, it runs all that code and builds the values for the fields.  Essentially, the 'pull' model of obtaining these summary fields.

 

or

 

2) Create fields on the Opportunity object to act as placeholders for the summary values, then put logic in in insert/update/delete triggers for each of the 'related' objects that will  update those placeholder field values incrementally as the related object records are manipulated. (i.e. when a new related object record is created, summary field count value is 'current value +1', etc.)  This is essentially the 'push' model of obtaining these summary fields. 

 

 

What does the expert community think about this? 

 

Currently, we are proceeding with option 1.  The visualforce embedding seems to work fine, although the layout restriction of harcoded page heights and delay-processed iframes  feels a little kludgey.  Plus, the user feels that the application is 'slower' since the page takes longer to grab all the extra field values.     

 

On the other hand, this way the code is all in one place rather than distributed amongst a variety of triggers on disparate objects. It seems more manageable and resilient to change this way. Even though the trigger-based 'push' model makes the page layouts very clean for the user.

 

Many Thanks for your input.

Hello,

I am trying to somehow default the 'CloseDate' field in the Opportunity as the users have absolutely no need for the field. Basically, I want to remove the requirement that the user must put something in this field.

I have tried everything I can think of using workflow rules, etc. and have even written a 'before' trigger to give the field a value so that the record will save. This does not appear to work, and we still get the 'Invalid Data' error since a required field is not being filled in.

Is this field somehow special in that I cannot even get to it with a before trigger? Is there ANY way to hardcode/default this field?

thanks.
Hello all,

I am trying to deploy a class via the Force.com IDE - Summer '08 version.

In the deployment wizard, Step 3, I choose JUST the class that I want to deploy.  When I click the 'Validate deployment' button, the results say the deployment would fail.  This is the error log (names xxx'ed out) :

*** Deployment Log ***
Result: FAILED
Date: July 26, 2008 2:33:42 PM EDT

# Deployed From:
   Project name: Sandbox
   Username: xxx@xxx.com.xxx
   Endpoint: test.salesforce.com

# Deployed To:
   Username: xxx@xxx.com
   Endpoint: www.salesforce.com

# Deploy Results:
   Name:    unpackaged/classes/weeklyStatusQuery.cls
   Action:  NO ACTION
   Result:  FAILED
   Problem: An error occurred on your page.

   Name:    unpackaged/package.xml
   Action:  UPDATED
   Result:  SUCCESS
   Problem: n/a

# Test Results:
   n/a




The only error indication is 'An error occured on your page'.  This class saves properly (to the Sandbox) through the IDE, the code coverage is above 85%, and it works fine in the Sandbox.  Is there any way of finding out what the 'error on page' is????  This is giving me nothing to go on...

Any help would be greatly appreciated. 

Regards,

Gireesh
I would like to apply different formatting for a column in a dataTable based on the value of one of the fields in the current record that the dataTable is displaying.  Basically, I need to color-code the 'rows' of the data table based on the value of one of the fields. 

I am currently doing this in the apex markup with an ugly, redundant set of 'IF' statments in the 'styleClass' attribute :

Code:
<apex:column headerValue="Description" style="text-align:left" width="20%" styleClass="{!if(Record.Investment_Status__c ='Exited', 'data1',if(Record.Investment_Status__c ='Portfolio Company', 'data2',if(Record.Investment_Status__c ='Signed Term Sheet', 'data3',if(Record.Investment_Status__c ='Terms Proposed', 'data4', if(Record.Investment_Status__c ='Due Dilligence', 'data5',if(Record.Investment_Status__c ='Visit- Multiple', 'data6',if(Record.Investment_Status__c ='Visit - Once', 'data7',if(Record.Investment_Status__c ='For Discussion', 'data8',if(Record.Investment_Status__c ='Conference Call', 'data9','color:black') ))))))))}">
     <apex:outputText value="{!Record.Description}"/>
</apex:column>

 
Ideally, I would like to create a method back in the controller which can return the proper styleClass value for each column.  I can't seem to figure out how to pass these values back and forth while the dataTable is getting setup.    Do I have to do some commandLink parameter passing and basically 're-render' each column with a roundtrip to the controller?    Am I missing the simple way to do this?? 

Thanks.

Hi there,

Has anyone figured out how to put a rich (not just plain text) page header on a VisualForce page that is being rendered as PDF? 

I have a VF page which is essentially a pretty report output - just a large dataTable that spans many pages.  I am using the 'headerValue' attribute to set the column headers at the top of the dataTable which works very well.  However, I need these column headers to show up on the top of every page that is created in the PDF. 

I have looked in depth at the @page CSS stuff that VF supposedly implements, but cannot find anything that would let me use any actual HTML/CSS for the header.

VisualForce PDF gurus - any ideas???   Has anyone put page headers on the top of every rendered PDF page?


Hi,

I am using the OpportunityLineItem.TotalPrice field in one of my VisualForce pages with the Standard 'Opportunity' controller.  We are preparing a sort of quote document with the line items and amounts from an Opportunity.  I am using the 'outputField' tag to show this field.  Simplified version of the page code below:

Code:
<apex:dataTable value="{!opportunity.OpportunityLineItems}" var="Item" width="675" rules="all" cellPadding="6" styleClass="data" columnClasses="info_bottom_1, info_bottom_2, info_bottom_3, info_bottom_4">
            <apex:column>
                 <apex:outputField value="{!Item.TotalPrice}"/>
            </apex:column>
   </apex:dataTable>

 
Since our organization has multi-currency turned on, the values coming from the 'TotalPrice' field have the ISO code as well as the value, and do not have a Currency Symbol.  For example, this is shown as:

USD 47,250.00


However, we would like to show this value as:

$47,250.00



Is there some way to have Salesforce return the value in this format?   Can this be done across currencies ?

Or, does someone have a good suggestion for doing a sort of  'replace' function so that I can replace the ISO code with the currency symbol for our currencies??

Many thanks for any ideas.
Hi,

I am using the OpportunityLineItem.TotalPrice field in one of my VisualForce pages with the Standard 'Opportunity' controller.  We are preparing a sort of quote document with the line items and amounts from an Opportunity.  I am using the 'outputField' tag to show this field.  Simplified version of the code below:

Code:
<apex:dataTable value="{!opportunity.OpportunityLineItems}" var="Item" width="675" rules="all" cellPadding="6" styleClass="data" columnClasses="info_bottom_1, info_bottom_2, info_bottom_3, info_bottom_4">
            <apex:column>
                 <apex:outputField value="{!Item.TotalPrice}"/>
            </apex:column>
   </apex:dataTable>

 
Since our organization has multi-currency turned on, the values coming from the 'TotalPrice' field have the ISO code as well as the value, and do not have a Currency Symbol.  For example, this is shown as:

USD 47,250.00


However, we would like to show this value as:

$47,250.00



Is there some way to have Salesforce return the value in this format?   Can this be done across currencies ?

Or, does someone have a good suggestion for doing a sort of  'replace' function so that I can replace the ISO code with the currency symbol for our currencies??

Many thanks for any ideas.




Hello,
 
We are having two related issues with using images in our VF pages for our products that we want to render to PDF (we are running in a Sandbox with Summer '08):
 
 
1) when we include an image file from an external server , the page will not render at all and gives an error 500.  No PDF is generated at all.    We have tried bringing the image in using both a normal <img> tag as well as the <apex:image >  tags. We have tried being in and out of developer mode, and have tried https and http URLs to the external server that is hosting the image.  The image does show in a browser window when we remove the 'renderAs=PDF'.  We have tried images of various sizes from multiple external servers and the results are always the same - will show in browser window, will not even render the pdf file.
 
2)   We also have an image at the top of the page which is a Static resource in SF.  this image is essentially our logo header.  When we choose render as pdf, (and remove any external image links), the PDF will be generated however the logo file does not appear.  Again, it shows if we remove the renderAs PDF.  As soon as we try to render as PDF, the image disappears.
 
 
Any ideas?  is there any more information that I can provide??
 
thanks!
Hello all, this is a tough one for me to explain, but i am baffled :
 
We have a detail button on the Leads object which has javascript code that converts the Lead into an Account/Contact and proceeds to automatically send an email using the sendemail() function.
 
This was working wonderfully for a long time until this week when users suddenly said the button "wasn't working"
 
In fact, the code was still converting the Lead however when it got to the sendemail() call, it returned an error:
 
"sforce.connector.sendEmail() is not a function"
 
 
The code under this button has not changed, nor has anyone's permissions.  My first thought was that something changed with the API that meant these users needed some additional permission.   I tried nearly every combination of profiles and permissions and could not get it to work.  Randomly, I moved a user to a new page layout with the button on it and suddenly it worked as normal again.
 
After further testing, I found that if I simply moved the button in the page layout (there are other custom buttons), it would work.  if I moved it back to its original location, it would fail with the exact same error.
 
 
Does anyone have any logical explanation for this?  I am stumped, and would like to know what to do to prevent this in the future.
 
many thanks
 
Hello, 

I need to be able to automatically send an email alert via workflow to the email address in a Lead record (outside of SF).  Is this possible? 

I have searched the forums and this problem seems to come up quite often with no solution.  Does anyone have any good ideas about how to do this?

I am willing to use the API/S-control/javascript to do this if it is necessary.

Many thanks!
Hello,

I am working on my first custom Detail page button and am having some problems.  I am trying to use the 'execute javascript' option using the 'onClick' event.  All I want this button to do is change the value in a field on the record.

The code that I am using is pasted below.  It is a modification of some code that I am successfully using in a custom button on a Search Page Layout.  When I try to run this, I get a Javascript error saying '<sforce id>' undefined, where <sforce id> is the record id for the record I am currently viewing.

I cannot seem to find ANY code examples of a custom detail page button  anywhere.  Can anyone help out?  I am VERY rusty with Javascript - is my problem a mere syntax/useage error??

Many thanks to the SF community!


Here is the code I am using:

{!REQUIRESCRIPT("/soap/ajax/8.0/connection.js")}

var newRecords = [];
 
var c = new sforce.SObject("Session__c");
c.id ={!Session__c.Id};
c.Status__c = "Approved";
newRecords.push(c);

result = sforce.connection.update(newRecords);

window.location.reload();
(Alternate title: How to edit the 'items to approve' related list?)


ok, so here is our issue: 

We have a multi-step approval process using the new workflow and approvals engine in winter '07.   At each step of the process, the custom 'status' field for the object is updated with a new value.    Today, the same person in our org performs the approval for more than one step of the process.  So, when this user looks at their 'items to approve' list on the home page, they have approvals waiting from multiple steps of the process.    The user would like to be able to see which 'step' of the process each 'item to approve' is actually in. 

This would be feasible if we could include on the 'items to approve' related list the custom 'status' field (or any field) from the object that the approval process is assigned/related to.  However, this does not seem possible.   Can anyone confirm this?

Additionally, if you click 'Manage All' from the home tab, you are able to see a little more detail about the approvals, but still nothing that would indicate where in the process it is.  You can edit these related list views, but still cannot add any fields from the approval related object.  There is a field called 'Description', however, I cannot seem to decipher just were exactly this field is fed from.

Are there any ideas or suggestions out there??

Many Thanks!

Is there any one who knows how to use setContentType for Meeting Invites when we send an Email with EmailFileAttachment.

 

Much appreciated

Hi,

 

I am having difficulty with attempting to create a new custom object. I have a valid connection etc. (In this case to a sandbox).

 

The login credentials have sysadmin rights.

 

The error I get is "Unable to determine type mapping for type CustomObject.  Type is illegal here."

 

I have no idea what the issue is. 

 

I have posted the SOAP request below (header removed).

 

 

<?xml version="1.0" encoding="utf-8"?> <SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header> {Header removed} </SOAP-ENV:Header> <SOAP-ENV:Body xmlns="http://tempuri.org/"> <create xmlns="http://soap.sforce.com/2006/04/metadata"> <metadata xsi:type="ns1:CustomObject"> <fullName>MYOB__c</fullName> <customSettingsType>List</customSettingsType> <deploymentStatus>Deployed</deploymentStatus> <description>This is a test Object created using the Metadata API.</description> <enableActivities>true</enableActivities> <fields> <fullName>MyField__c</fullName> <description>This is a description of a custom field.</description> <formulaTreatBlanksAs>BlankAsBlank</formulaTreatBlanksAs> <label>My Custom Field</label> <maskChar>asterisk</maskChar> <maskType>all</maskType> <picklist> <sorted>false</sorted> </picklist> <summaryOperation>count</summaryOperation> <type>Text</type> </fields> <gender>Neuter</gender> <label>Mind Your Own Business</label> <nameField> <formulaTreatBlanksAs>BlankAsBlank</formulaTreatBlanksAs> <maskChar>asterisk</maskChar> <maskType>all</maskType> <picklist> <sorted>false</sorted> </picklist> <summaryOperation>count</summaryOperation> <type>AutoNumber</type> </nameField> <pluralLabel>Mind Your Own Businesses</pluralLabel> <searchLayouts /> <sharingModel>ReadWrite</sharingModel> <startsWith>Consonant</startsWith> </metadata> </create> </SOAP-ENV:Body> </SOAP-ENV:Envelope>

 

 

 

 

 Any help is appreciated.

Hey there - this one goes out to the Salesforce devs that may be listening.  

 

We have a visualforce page that was written about a year ago which is basically a custom report exporting as PDF.   Suddenly, without any changes in page code, the page stopped working and is giving the dreaded 'internal server error' message withthe following code:

Error ID: 1183247688-671 (1462077656)

 

All the debug logs say that the page call succeeded and there is no indication of any error.  This has been submitted to support as #02660758. 

 

What can we do to try and understand what is actually causing this error??  Is there any way to get more information on the error detail?

 

Many Thanks! 

Hello - would like to get the community's opinion/input on this:

 

We are performing an implementation  where the user is requiring a large set of individual 'roll-up' fields on the Opportunity (and other) objects.  These fields are essentially summaries for fields on other objects that are related to the opportunity.  These objects are not master-detail, and actually may not be directly related (could be 2 objects away, for example).  After refactoring the object design as much as possible, it is not possible to bring things together nicely into master-detail relationships to use the Salesforce 'Roll-up Summary fields'.  (although Salesforce allowing 3-deep master detail relationships would go a long way)

 

So, when we decided how to implement this, we come up with the following two options: 

 

 

1)  Create 'mini', single-field Visualforce pages for each of these summaries that can be embedded into the Standard Opportunity page layout.  These pages would be for the standard 'Opportunity' controller but have a controller extension, lets call it 'oppFieldCalcs'.  Create the apex class 'oppFieldCalcs' to generate the values of each of these 'mini' visalforce pages/fields using SOQL statements, etc. as normal.  When the page loads, it runs all that code and builds the values for the fields.  Essentially, the 'pull' model of obtaining these summary fields.

 

or

 

2) Create fields on the Opportunity object to act as placeholders for the summary values, then put logic in in insert/update/delete triggers for each of the 'related' objects that will  update those placeholder field values incrementally as the related object records are manipulated. (i.e. when a new related object record is created, summary field count value is 'current value +1', etc.)  This is essentially the 'push' model of obtaining these summary fields. 

 

 

What does the expert community think about this? 

 

Currently, we are proceeding with option 1.  The visualforce embedding seems to work fine, although the layout restriction of harcoded page heights and delay-processed iframes  feels a little kludgey.  Plus, the user feels that the application is 'slower' since the page takes longer to grab all the extra field values.     

 

On the other hand, this way the code is all in one place rather than distributed amongst a variety of triggers on disparate objects. It seems more manageable and resilient to change this way. Even though the trigger-based 'push' model makes the page layouts very clean for the user.

 

Many Thanks for your input.

Hi

We are using VF to generate a Quote for jobs based on Opps + Products we need it to render the PDF attachment as A4 rather than Letter size --- is this possible?

Thx
Adam // Internetware


Message Edited by AdammcUK on 01-20-2009 05:13 PM
I created a Plug-in for FireFox and IE7+ that searches the entire SFC Developer Community. The plug-in can be found at http://mycroft.mozdev.org/search-engines.html?name=salesforce+developer.

Enjoy,

Mike
I have created a very simple page to simply display a list of Accounts.  I am trying to make this list visible on a Sites page so I can demo some functionality to my team. 

Nothing I've tried yet has allowed me to display any object data, though the page renders fine within SFDC. 

Here's the code for the page.

Code:
<apex:page standardcontroller="account" showheader="true" recordsetvar="accounts">

<apex:form >
          
    <apex:pageblock title="All Accounts">
    
<apex:pageblockTable value="{!accounts}" var="a"> <apex:column value="{!a.Name}"/> <apex:column value="{!a.createddate}"/>
</apex:pageblocktable>
</apex:pageblock> </apex:form> </apex:page>

I have made sure that the Field Level Security is set to "Visible" for these fields.  Also, the Site Page Profile has "Read" Access to the Account object.

Can anyone recommend other things I should be looking at to get this (very simple) page to display? 

Thanks for any ideas!

I've started to use CSS to generate headers and footers for my visualforce pdfs, as below:

Code:
@page
{
 @top-right
 {
  content: "My Header";
 }
 @bottom-right
 {
  content: "My Footer";
 }
}

 
Is it at all possible to generate these headers and footers from information in my controller? So, for example, I can add the name of a record in my page header.  I've noticed in CSS3 you can use 'string-set' but this doesn't seem to work (or I don't know how to work it properly).

Anyone have any insight into this?

Hello,

I am trying to somehow default the 'CloseDate' field in the Opportunity as the users have absolutely no need for the field. Basically, I want to remove the requirement that the user must put something in this field.

I have tried everything I can think of using workflow rules, etc. and have even written a 'before' trigger to give the field a value so that the record will save. This does not appear to work, and we still get the 'Invalid Data' error since a required field is not being filled in.

Is this field somehow special in that I cannot even get to it with a before trigger? Is there ANY way to hardcode/default this field?

thanks.
Here is a problem that I have faced, and how I solved it. I am looking to see if there are other approaches:
 
I have to display a list of data.  I need to be able to customize the rows/cells of the display based on the data.  One example would be to display the text in Red if a certain condition is met.  Another would be to change the font/style/alignment based on the individual row data.
 
In a programming language like ASP .NET, I would be able to have the code behind (in Visual Force that would be the controller), be able to respond to certain events on the list object.  The one I use often in .NET is  "OnRowDataBound".  In that case the method is called for each row of data, and I get a handle to the visual objects that I can then customize.
 
In Visual Force, the Controller does not appear to have access to the VF Page.  It appears as though the relationship is one way, the VF page access attributes on the controller and calls methods for actions.
 
----------------------------------------------------------------------------
Here is a simple way to be able to accomplish it using the dataTable:
 
<apex:dataTable value="{!groups}" var="grp" >
             <apex:column styleClass="drugClassCol" >
                       <apex:facet name="header">Drug Class</apex:facet>
                        <span style="{!grp.nameStyle}">{!grp.obj.name}</span>
             </apex:column>    
</apex:dataTable>  

You can see that we created an html Span, and had the style returned from the row of data.  This way the data object can completely customize the style returned. 

----------------------------------------------------------------------------

However, you can see that there are 2 different attributes, and there is that "grp.obj.name".  The reason for this is that the SObject that we use does not and should not contain "Display code".  In the "Model View Controller" model, that means that the SObject is the Model, and the style generation is the View.  

We solve this problem by creating a SObject display object that contains the style customization logic. 

public class DrugGroupDisp
{
    private drug_group__c obj;
    public drug_group__c getObj()
    {
        return obj;
    }
    public void setObj(drug_group__c s)
    {
        obj = s;
    }

   public String getNameStyle()  

  {
        if (some condition} return 'color: red';

       return 'color: green';

    }

                   
    public void Setup(drug_group__c o)
    {
        obj = o;
    }
}

 

By having a direct reference to the original SObject, we can get access to all of its attributes, and then if needed we can made modifications and save.

the display object gives us a row level wrapper that can provide customizations that the Visual Force Page can use for rendering.

----------------------------------------------------------------------------

Here is how we load the display object:

public List<DrugGroupDisp> getGroups()
    {
         if (groups == null)
         {
             groups = new List<DrugGroupDisp>(); 
            
             for(drug_group__c groupRow : [select id, name, x1, x2, x3...   from drug_group__c])
            {
                DrugGroupDisp grp = new DrugGroupDisp();
                grp.Setup( groupRow );                                 
                groups.Add( grp);
            }     
        }   
        return groups;
    }

----------------------------------------------------------------------------

So, the controller loads the data into a list of Display objects, and the Visual Force page reads each row and access the getter methods on each row that can customize the display based on different value(s) on the SObject.

This is my solution to how to solve the problem.  Are there other approaches?  It would be great to know if there is another way! 

Hopefully sometime in the future we will have the ability for the Controllers to have more access into the rendering process for the VF Pages.

Thanks,

Steve



Message Edited by SteveEthos on 08-05-2008 12:08 PM
Hi,

I have several  Visual Force pages where I am rendering as a pdf. I want to add page breaks and repeat page header (which includes company logo / address, document number, page number etc )  to the pdf document .

I am able to display page number by using  @PAGE rule in the CSS.
I am using <PANELGRID> for the header and <DATATABLE> to display detail information. Is there a way to control the number of lines in a page and repeat some header on all pages.

Is there any way we can control this?

thanks

Hi,
    I am creating a Search Page using VF. I have four input search fields and would like to display results in a table. I have created search pages before using only two input fields. It worked fine but I am not able to do the same with four search fields. Could anyone help me with this please ?  I am using if statements to get the results. Could anyone could tell me a better way of doing a search ?
 
Thanks
  • July 29, 2008
  • Like
  • 0
Hello all,

I am trying to deploy a class via the Force.com IDE - Summer '08 version.

In the deployment wizard, Step 3, I choose JUST the class that I want to deploy.  When I click the 'Validate deployment' button, the results say the deployment would fail.  This is the error log (names xxx'ed out) :

*** Deployment Log ***
Result: FAILED
Date: July 26, 2008 2:33:42 PM EDT

# Deployed From:
   Project name: Sandbox
   Username: xxx@xxx.com.xxx
   Endpoint: test.salesforce.com

# Deployed To:
   Username: xxx@xxx.com
   Endpoint: www.salesforce.com

# Deploy Results:
   Name:    unpackaged/classes/weeklyStatusQuery.cls
   Action:  NO ACTION
   Result:  FAILED
   Problem: An error occurred on your page.

   Name:    unpackaged/package.xml
   Action:  UPDATED
   Result:  SUCCESS
   Problem: n/a

# Test Results:
   n/a




The only error indication is 'An error occured on your page'.  This class saves properly (to the Sandbox) through the IDE, the code coverage is above 85%, and it works fine in the Sandbox.  Is there any way of finding out what the 'error on page' is????  This is giving me nothing to go on...

Any help would be greatly appreciated. 

Regards,

Gireesh
Hi,

I am using the OpportunityLineItem.TotalPrice field in one of my VisualForce pages with the Standard 'Opportunity' controller.  We are preparing a sort of quote document with the line items and amounts from an Opportunity.  I am using the 'outputField' tag to show this field.  Simplified version of the page code below:

Code:
<apex:dataTable value="{!opportunity.OpportunityLineItems}" var="Item" width="675" rules="all" cellPadding="6" styleClass="data" columnClasses="info_bottom_1, info_bottom_2, info_bottom_3, info_bottom_4">
            <apex:column>
                 <apex:outputField value="{!Item.TotalPrice}"/>
            </apex:column>
   </apex:dataTable>

 
Since our organization has multi-currency turned on, the values coming from the 'TotalPrice' field have the ISO code as well as the value, and do not have a Currency Symbol.  For example, this is shown as:

USD 47,250.00


However, we would like to show this value as:

$47,250.00



Is there some way to have Salesforce return the value in this format?   Can this be done across currencies ?

Or, does someone have a good suggestion for doing a sort of  'replace' function so that I can replace the ISO code with the currency symbol for our currencies??

Many thanks for any ideas.
Hello,
 
We are having two related issues with using images in our VF pages for our products that we want to render to PDF (we are running in a Sandbox with Summer '08):
 
 
1) when we include an image file from an external server , the page will not render at all and gives an error 500.  No PDF is generated at all.    We have tried bringing the image in using both a normal <img> tag as well as the <apex:image >  tags. We have tried being in and out of developer mode, and have tried https and http URLs to the external server that is hosting the image.  The image does show in a browser window when we remove the 'renderAs=PDF'.  We have tried images of various sizes from multiple external servers and the results are always the same - will show in browser window, will not even render the pdf file.
 
2)   We also have an image at the top of the page which is a Static resource in SF.  this image is essentially our logo header.  When we choose render as pdf, (and remove any external image links), the PDF will be generated however the logo file does not appear.  Again, it shows if we remove the renderAs PDF.  As soon as we try to render as PDF, the image disappears.
 
 
Any ideas?  is there any more information that I can provide??
 
thanks!
i'm stuck on this one.  we want to be able to report on trending for cases/calls on a per hour basis.  typically, one would do this by extracting the hour of the day from a date/time or time field and then summary reporting on that.

since the text functions for formula fields don't include a substring capability, i'm getting lost here.

does anyone have or know how to create a formula that will take a date/time and return the hour from it?  preferably 24 hour scale vs. 12 hour scale...

thanks!
Hi Formula Authors,
Now that the Winter ’07 release is here, I wanted to alert you to some key formula enhancements in the release.  

Language changes
  • Max formula size increases from 1000 to 1300 characters.  (No change in the max compiled size limit of 4K)
  • No more curly braces on merge fields in formulas:  {!AccountName}  --> AccountName
  • Access to “global variables” in formulas: $Organization, $User (current user), $Profile (current user's profile), $UserRole (current user's role)
  • Access to Record Type field ($RecordType.Name)
New functions
  • DATEVALUE(datetime), DATEVALUE(text) – Convert a datetime field or a text field to a date field
  • FIND (start_text, text [, start_num]) - return the position of the string search_text within the string text
  • SUBSTITUTE (text, old_text, new_text) - find instances of the string old_text in the string text and replace with new_text
  • BR() – insert a line break in a text formula
  • MIN( num1, num2, num3,…) , MAX( num1, num2, num3…) – return the min or max value from the input parameters
  • New functions for validation rules: ISCHANGED (field), PRIORVALUE (field), ISNEW()
  • Advanced functions for S-Control scripting: LINKTO, URLFOR, INCLUDE, GETRECORDIDS
Other enhancements
  • HYPERLINK formulas can now use any protocol handler (e.g., "javascript&colon;" instead of "http:")
  • IMAGE formulas now work in email and mail merge (Microsoft Word) templates
  • TEXT function now accepts datetime values as well as numeric values
Formula Editor changes
  • Field Type picklist allows selection of object (current object, $profile, $user, etc.)
  • Insert Operator is now a menu button instead of separate buttons for each operator
New uses for formula expressions
We are now leveraging our formula language in a number of new and powerful ways. 
  • Workflow field update actions (Enterprise & Unlimited Edition) - set and store field values in currency, number, percent, text, date, and date/time fields based on a formula expression
  • Validation rules - Boolean formula expressions that can prevent incorrect data from being saved
  • Default field values - initial values to be populated in fields when new records are created
  • Server-side formula expressions for S-Controls
For more details, please check out the Winter '07 Release Notes, available from the Help and Training link in the application banner.

Regards,
Eric Bezar
Platform Product Management



  • January 08, 2007
  • Like
  • 0