• BigGeo
  • NEWBIE
  • 25 Points
  • Member since 2006

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 4
    Replies

Hi, i am new to using visualforce and i am trying to create a detail page to overright the current detail page for a custom object. The custom object contains a picklist field containing 3 values. I have created a custom formula field using Image and Case to display the values in the picklist as images in the detail view. the formula in the field is:

 

IMAGE(
CASE( Status__c ,
"Not Received","https://emea.salesforce.com/resource/1242640894000/RedFlagStatus",
"Received", "https://emea.salesforce.com/resource/1242641297000/YellowFlagStatus",
"Checked","https://emea.salesforce.com/resource/1242641338000/GreenFlagStatus",
"Status"),
"Status") 

 

 In my visualforce page i am using <apex:outputField value="{!CustomObject__c.Status__c"/> to display the custom formula field. However the imgae is not displaying, instead it has, <img src="https://emea.salesforce.com/resource/1242641297000/YellowFlagStatus" alt="Status" border="0"/> in the field output. If anyone can help with how i should display the picklist values as images on the detail page of a record then that would be great.

 

Matt.

Hi all,

When connecting to an external web service importing the WSDL in Apex, I get the error:

"uncaught exception: {faultcode:'soapenv:Client', faultstring:'System.CalloutException: IO Exception: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"

The problem is that the certificate of the site server is not totally valid or not widely recognized. The web service belongs to the Tax Department of the Government of Argentina, and they approve their own SSL certificates. To emit electronic invoicing in Argentina, you have to approve each invoice sending it to the web service and you get a response with an authorization number which has to be included in the invoice.

Furthermore, I need also to access another web service that is only for testing purpose and it has the same issue.

Apart from Salesforce Apex Code, this exception also happens in .NET and Java, but these environments have their own ways to bypass the exception (import and install the certificate in the local machine, parameters to accept the ssl connection anyway, and so on...).
In Salesforce Apex documentation, I only found the "Remote Site Settings" option (Setup-Security Options) where the security protocol can be disable, but the exception occurs the same.

Please if someone know if there is a way to force the connection between Salesforce and the web service. I also wonder how tests of connection between Salesforce and not full deployed web services (with own signed or no valid certificates yet) should be performed.

Thanks in advance!
I need to retrieve field values of PriceBookEntry and Product2 from OpportunityLineItems, but I get an error message when I try to get the values from the relational query result (the query SELECT command is Ok).

The following sample code retrieves OpportunityLineItems that don't have the same UnitPrice and ListPrice:

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

var result = sforce.connection.query("SELECT Id, PriceBookEntry.ProductCode, PriceBookEntry.Product2.ProductCost__c, UnitPrice, ListPrice, PriceDif__c from OpportunityLineItem WHERE PriceDif__c!=0 LIMIT 50" );

var oItems = result.getArray("records");

var codes = "";
for (var i=0; i<oItems.length; i++) {
  codes += oItems[i].PriceBookEntry.ProductCode + " - " + oItems[i].PriceBookEntry.Product2.ProductCost__c;
}

if (oItems.length > 0)
  alert(codes);

but I get the following error message when I try to get the product code from PriceBookEntry, or the ProductCost__c from Product2:
"oItems[i].PriceBookEntry has no properties"

Anyone know how to get these values? Thanks in advance!

  • January 12, 2007
  • Like
  • 0

Hi, i am new to using visualforce and i am trying to create a detail page to overright the current detail page for a custom object. The custom object contains a picklist field containing 3 values. I have created a custom formula field using Image and Case to display the values in the picklist as images in the detail view. the formula in the field is:

 

IMAGE(
CASE( Status__c ,
"Not Received","https://emea.salesforce.com/resource/1242640894000/RedFlagStatus",
"Received", "https://emea.salesforce.com/resource/1242641297000/YellowFlagStatus",
"Checked","https://emea.salesforce.com/resource/1242641338000/GreenFlagStatus",
"Status"),
"Status") 

 

 In my visualforce page i am using <apex:outputField value="{!CustomObject__c.Status__c"/> to display the custom formula field. However the imgae is not displaying, instead it has, <img src="https://emea.salesforce.com/resource/1242641297000/YellowFlagStatus" alt="Status" border="0"/> in the field output. If anyone can help with how i should display the picklist values as images on the detail page of a record then that would be great.

 

Matt.

Is it possible to have an imaged formula field display on a Visualforce Page? 
 
If so where do the images need to be stored (I've tried both Documents and Static Resources)?  And what component and attribute do you use to display it?  Output field Value displays the url and not the actual image.  The formula is valid and it does display on a traditional SF page.  
 
Thanks,
Heather
Hi all,

When connecting to an external web service importing the WSDL in Apex, I get the error:

"uncaught exception: {faultcode:'soapenv:Client', faultstring:'System.CalloutException: IO Exception: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"

The problem is that the certificate of the site server is not totally valid or not widely recognized. The web service belongs to the Tax Department of the Government of Argentina, and they approve their own SSL certificates. To emit electronic invoicing in Argentina, you have to approve each invoice sending it to the web service and you get a response with an authorization number which has to be included in the invoice.

Furthermore, I need also to access another web service that is only for testing purpose and it has the same issue.

Apart from Salesforce Apex Code, this exception also happens in .NET and Java, but these environments have their own ways to bypass the exception (import and install the certificate in the local machine, parameters to accept the ssl connection anyway, and so on...).
In Salesforce Apex documentation, I only found the "Remote Site Settings" option (Setup-Security Options) where the security protocol can be disable, but the exception occurs the same.

Please if someone know if there is a way to force the connection between Salesforce and the web service. I also wonder how tests of connection between Salesforce and not full deployed web services (with own signed or no valid certificates yet) should be performed.

Thanks in advance!
I need to retrieve field values of PriceBookEntry and Product2 from OpportunityLineItems, but I get an error message when I try to get the values from the relational query result (the query SELECT command is Ok).

The following sample code retrieves OpportunityLineItems that don't have the same UnitPrice and ListPrice:

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

var result = sforce.connection.query("SELECT Id, PriceBookEntry.ProductCode, PriceBookEntry.Product2.ProductCost__c, UnitPrice, ListPrice, PriceDif__c from OpportunityLineItem WHERE PriceDif__c!=0 LIMIT 50" );

var oItems = result.getArray("records");

var codes = "";
for (var i=0; i<oItems.length; i++) {
  codes += oItems[i].PriceBookEntry.ProductCode + " - " + oItems[i].PriceBookEntry.Product2.ProductCost__c;
}

if (oItems.length > 0)
  alert(codes);

but I get the following error message when I try to get the product code from PriceBookEntry, or the ProductCost__c from Product2:
"oItems[i].PriceBookEntry has no properties"

Anyone know how to get these values? Thanks in advance!

  • January 12, 2007
  • Like
  • 0