• Aurélien.Laval
  • NEWBIE
  • 30 Points
  • Member since 2013


  • Chatter
    Feed
  • 1
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 20
    Replies
Hello,

I'm developing an application which use an external webservice and when I call him, I get this error message :
System.CalloutException: Endpoint is not valid

I don't understand what is wrong because if I try this URL in the browser, it works.

This is the endpoint : https://maps.googleapis.com/maps/api/geocode/json?address=+94+Rue+de+Provence+75009+Paris+france&components=country:france|postal_code:75009&language=france

I don't understand why but this endpoint works :
https://maps.googleapis.com/maps/api/geocode/json?address=+94+Rue+de+Provence+Paris+france&components=country:france&language=france

I use the Google's API to normalize addresses and it works if I don't use the postal code or the country in the same time.
Postal code + ountry = doesn't work
Postal code = works
Country = works

I created a remote site in Salesforce.com and it is active : https://maps.googleapis.com

If I enter the endpoint (full, postal code with the country) in the Google browser, it works..

Please help mep, I feel crazy.. :
Hello,

I'm developing a Visualforce page with a controller and I've a problem in the 'rendered' markup.

When a user click on a button, he calls a controller method and then the results displays themselves in the visualforce page if a variable equals to true and a variable equals to false.

This is my controller :
 
public PageReference searchForm(){
        
        try{
            this.attributionList = this.getAttributionsList(this.anAttributionToSearch);
        
            this.clickToSearch = true;        
            this.clickToCreate = false;
            this.hasSearched = true;
        }catch(Exception e){
            this.displayErrorMessage(e.getMessage());
        }
        
        return null;
    }




And my Visualforce page :
 
<apex:form>
   <apex:commandButton action="{!searchForm}" value="{!$Label.Labs_Sf_Search_Button}" rerender="theTabPanel" status="actionPopup"/>
</apex:form>

<apex:pageBlock title="{!SUBSTITUTE($Label.Labs_Sf_Number_Of_Results, '#', TEXT(attributionList.size))}" rendered="{!IF(!clickToCreate && clickToSearch, true, false)}">

...

</apex:pageBlock>




I don't understand why my condition doesn't work? :(
The pageBlock never displays himself.

Thanks for the help.
Hello,

I've created a Salesforce Community and I would like see cases.

Unfortunately, when I connect myself with a user, I can't see the user's cases however cases are private.

What can I do to see them please?

Thank for the answers.
Hello, I'm trying to use a custom link in a page layout in Salesforce which execute a Javascript redirection.

It works in Salesforce but not in Salesforce1 (Android phone), why?

That's my code in the custom link :
document.location.href="https://cs18.salesforce.com/00U/e?who_id=*****";



I can't get an answer on the internet. :/

Thank for the help.
 
Hello all,

I'm developping a batch which send emails to a contact List but it doesn't work and I'm getting all time this error :
[code]
INVALID_FIELD_WHEN_USING_TEMPLATE, When a template is specified the plain text body, html body, subject and charset may not be specified : []
[/code]

And below, my code :
[code]
List<EmailTemplate> emailTemplateList = [
      SELECT Id
      FROM EmailTemplate
      WHERE DeveloperName = :emailTemplateName
];

List<Messaging.SingleEmailMessage> emailsToSend = new List<Messaging.SingleEmailMessage>();

for(Contact aContact : contactList){
                        
      Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
                            
      mail.setTargetObjectId(aContact.Id);
                        
      mail.setOrgWideEmailAddressId(oweaMap.get(emailMap.get(aRegion)).Id);
                    
      mail.setSubject(mailSubject);
                        
      mail.setSaveAsActivity(false);
                        
      mail.setBccSender(false);
                        
      mail.setUseSignature(false);
                        
      mail.setCharset('UTF-8');
                                                
      mail.setTemplateId(emailTemplateList[0].Id);
                        
      emailsToSend.add(mail);
}

Messaging.sendEmail(emailsToSend);
[/code]

The error is on the last line : Messaging.sendEmail(emailsToSend);

I've trying in selecting Body, HtmlValue and Subject field on the EmailTemplate object but it doesn't work..

What's wrong please?
Hello all,

I would like to know what mean the word 'Apex' for Salesforce?

Is it 'Oracle Application Express' (http://en.wikipedia.org/wiki/Oracle_Application_Express) ?
Is it the same thing?

Thanks.

Hello, I would like migrate from a portal to a community but I don't know how proced.

I have readed the documentation (http://help.salesforce.com/help/pdfs/en/salesforce_portal_to_community_migration_cheatsheet.pdf) an others articles but it's not explicated how migrate.

Where can I find a turorial to do the migration please?
Hello,

I am using a community and I am using a rich text field to display an image but in the community, this image is not displaying, I get this :

User-added image

To display my image, I use the <apex:outputText escape="false" /> tag.

I checked the accessibility of my field and all is good.

Have I forgotten to check some thing please?

Best regards
Hello, I'm developping a test class to cover an Apex class which call a web service.

I have generated the client class thanks to WSDL2Apex with importing the WSDL.

The web service return a XML content which is parsed and transformed in a 'Result' object which contains a lot of others objects.

I have read the documentation (http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_callouts_wsdl2apex_testing.htm (http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_callouts_wsdl2apex_testing.htm" target="_blank)) and it is said to specify a mock response.

Is there a way to give a XML content as a static resource to the mock response to simulate the web service response or I must create a Result object with all values which is the parsed result?

Thanks to advance.

Hello, is it possible to configure Salesforce knowledge base to be accessible with an unauthenticated customer from a Salesforce community?

 

I tested the 'Sample Public Knowledge Base for Salesforce Knowledge' (https://appexchange.salesforce.com/listingDetail?listingId=a0N30000001gFH9EAM&tab=r) app from the Appexchange but I don't see my knowledge article in the visualforce page 'knowledgeHome' because my Site.getName() is null.

 

Thanks for the response.

Hello, is it possible to remove the 'Reset password' button from the user layout?

 

I want override this button or remove him and create an other.

 

Thanks for the responses.

Hello, Salesforce can't parse my WSDL file cause it doesn't find binding, this is my error : Error: Failed to parse wsdl: Failed to parse WSDL: Unable to find binding {http://schemas.datacontract.org/2004/07/FujiTTModel/}basicHttpFujiTTWebService. Found basicHttpFujiTTWebService instead.

 

And this is my WSDL file :

<?xml version="1.0" encoding="iso-8859-1"?>
<wsdl:definitions 
	name="FujiTTWebService" 
	targetNamespace="http://tempuri.org/" 
	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
	xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" 
	xmlns:wsa10="http://www.w3.org/2005/08/addressing" 
	xmlns:tns="http://schemas.datacontract.org/2004/07/FujiTTModel/" 
	xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" 
	xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" 
	xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" 
	xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" 
	xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" 
	xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" 
	xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" 
	xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" 
	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
	xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
		<wsdl:types>
				<xs:schema targetNamespace="http://schemas.datacontract.org/2004/07/FujiTTModel" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
						
.....

				</xs:schema>
		</wsdl:types>
		<wsdl:message name="IFujiTTService_Hello_InputMessage">
				<wsdl:part name="parameters" element="tns:Hello" />
		</wsdl:message>
		<wsdl:message name="IFujiTTService_Hello_OutputMessage">
				<wsdl:part name="parameters" element="tns:HelloResponse" />
		</wsdl:message>
		<wsdl:message name="IFujiTTService_GetConsumerOrders_InputMessage">
				<wsdl:part name="parameters" element="tns:GetConsumerOrders" />
		</wsdl:message>
		<wsdl:message name="IFujiTTService_GetConsumerOrders_OutputMessage">
				<wsdl:part name="parameters" element="tns:GetConsumerOrdersResponse" />
		</wsdl:message>
		<wsdl:message name="IFujiTTService_GetConsumerOrdersByDealer_InputMessage">
				<wsdl:part name="parameters" element="tns:GetConsumerOrdersByDealer" />
		</wsdl:message>
		<wsdl:message name="IFujiTTService_GetConsumerOrdersByDealer_OutputMessage">
				<wsdl:part name="parameters" element="tns:GetConsumerOrdersByDealerResponse" />
		</wsdl:message>
		<wsdl:portType name="IFujiTTService">
				<wsdl:operation name="Hello">
						<wsdl:input wsaw:Action="http://tempuri.org/IFujiTTService/Hello" message="tns:IFujiTTService_Hello_InputMessage" />
						<wsdl:output wsaw:Action="http://tempuri.org/IFujiTTService/HelloResponse" message="tns:IFujiTTService_Hello_OutputMessage" />
				</wsdl:operation>
				<wsdl:operation name="GetConsumerOrders">
						<wsdl:input wsaw:Action="http://tempuri.org/IFujiTTService/GetConsumerOrders" message="tns:IFujiTTService_GetConsumerOrders_InputMessage" />
						<wsdl:output wsaw:Action="http://tempuri.org/IFujiTTService/GetConsumerOrdersResponse" message="tns:IFujiTTService_GetConsumerOrders_OutputMessage" />
				</wsdl:operation>
				<wsdl:operation name="GetConsumerOrdersByDealer">
						<wsdl:input wsaw:Action="http://tempuri.org/IFujiTTService/GetConsumerOrdersByDealer" message="tns:IFujiTTService_GetConsumerOrdersByDealer_InputMessage" />
						<wsdl:output wsaw:Action="http://tempuri.org/IFujiTTService/GetConsumerOrdersByDealerResponse" message="tns:IFujiTTService_GetConsumerOrdersByDealer_OutputMessage" />
				</wsdl:operation>
		</wsdl:portType>
		<wsdl:binding name="basicHttpFujiTTWebService" type="tns:IFujiTTService">
				<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
				<wsdl:operation name="Hello">
						<soap:operation soapAction="Hello" style="document" />
						<wsdl:input>
								<soap:body use="literal" />
						</wsdl:input>
						<wsdl:output>
								<soap:body use="literal" />
						</wsdl:output>
				</wsdl:operation>
				<wsdl:operation name="GetConsumerOrders">
						<soap:operation soapAction="GetConsumerOrders" style="document" />
						<wsdl:input>
								<soap:body use="literal" />
						</wsdl:input>
						<wsdl:output>
								<soap:body use="literal" />
						</wsdl:output>
				</wsdl:operation>
				<wsdl:operation name="GetConsumerOrdersByDealer">
						<soap:operation soapAction="GetConsumerOrdersByDealer" style="document" />
						<wsdl:input>
								<soap:body use="literal" />
						</wsdl:input>
						<wsdl:output>
								<soap:body use="literal" />
						</wsdl:output>
				</wsdl:operation>
		</wsdl:binding>
		<wsdl:service name="FujiTTWebService">
				<wsdl:port name="basicHttpFujiTTWebService" binding="tns:basicHttpFujiTTWebService">
						<soap:address location="http://62.180.227.66:1024/FujiTTServiceLibrary" />
				</wsdl:port>
		</wsdl:service>
</wsdl:definitions>

Why it doesn't find the tns's namespace whereas it is defined into the wsdl's definitions?

 

Thank for the answers.

Hello, I try to parse a web service's XML response in reading the documentation (http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_xml_dom.htm) but it doesn't work whereas my XML is valid.

 

This is my XML response :

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <GetConsumerOrdersResponse xmlns="http://tempuri.org/">
         <GetConsumerOrdersResult xmlns:a="http://schemas.datacontract.org/2004/07/FujiTTModel" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <a:ConsumerOrders>
               <a:ConsumerOrder>
                  <a:ActionCode i:nil="true"/>
                  <a:Campaign i:nil="true"/>
                  <a:Consumer>
                     <a:Company i:nil="true"/>
                     <a:ConsumerId>e27dc-6e93-483f-bf14-fe01e477fc7b</a:ConsumerId>
                     <a:Email i:nil="true"/>
                     <a:ExternalId i:nil="true"/>
                     <a:FirstName i:nil="true"/>
                     <a:InvoiceAddress>
                        <a:AddressLine1 i:nil="true"/>
                        <a:AddressLine2 i:nil="true"/>
                        <a:AddressLine3 i:nil="true"/>
                        <a:AddressNumber i:nil="true"/>
                        <a:AddressNumberExtension i:nil="true"/>
                        <a:City i:nil="true"/>
                        <a:Company i:nil="true"/>
                        <a:Country i:nil="true"/>
                        <a:FirstName i:nil="true"/>
                        <a:LastName i:nil="true"/>
                        <a:State i:nil="true"/>
                        <a:Title i:nil="true"/>
                        <a:ZipCode i:nil="true"/>
                     </a:InvoiceAddress>
                     <a:Language i:nil="true"/>
                     <a:LastName>BARBARA BABA</a:LastName>
                     <a:ShippingAddress i:nil="true"/>
                     <a:Telephone i:nil="true"/>
                     <a:Title i:nil="true"/>
                  </a:Consumer>
                  <a:Dealer>
                     <a:Address>16, Rue de la merveille</a:Address>
                     <a:City>BOIS</a:City>
                     <a:Country>FR</a:Country>
                     <a:DealerId>8ff5-8715-48e3-9688-723039d3f212</a:DealerId>
                     <a:Email i:nil="true"/>
                     <a:LabCode>33</a:LabCode>
                     <a:Language i:nil="true"/>
                     <a:Name>Imaging France</a:Name>
                     <a:Number>7651</a:Number>
                     <a:ShippingCode>?-0494</a:ShippingCode>
                     <a:Telephone i:nil="true"/>
                     <a:Zipcode>78391</a:Zipcode>
                  </a:Dealer>
                  <a:Discount>0</a:Discount>
                  <a:ExternalId i:nil="true"/>
                  <a:IsMailOrder>false</a:IsMailOrder>
                  <a:LabCode>33</a:LabCode>
                  <a:Make>FFF</a:Make>
                  <a:MessageList i:nil="true"/>
                  <a:OrderSize>30634986</a:OrderSize>
                  <a:ParentFileId>62f1c94d-c967-49c8-8758-e32987422e3</a:ParentFileId>
                  <a:ProductList i:nil="true"/>
                  <a:ProductionOrders>
                     <a:ProductionOrder>
                        <a:BackupPath>\\fujife10\Backup-2013-10-24-55996</a:BackupPath>
                        <a:DateToShip>2013-10-28T17:00:00</a:DateToShip>
                        <a:DeliveryNoteList i:nil="true"/>
                        <a:FileId>62f1c94d-c967-49c8-8758-e32875f4b2e3</a:FileId>
                        <a:IsConfirmed>true</a:IsConfirmed>
                        <a:IsErrorFlagged>false</a:IsErrorFlagged>
                        <a:IsPriced>true</a:IsPriced>
                        <a:IsProduced>true</a:IsProduced>
                        <a:LabDays>0</a:LabDays>
                        <a:MessageList i:nil="true"/>
                        <a:PartNumber>0</a:PartNumber>
                        <a:PartsTotal>0</a:PartsTotal>
                        <a:ProductList i:nil="true"/>
                        <a:ProductionReference>55996</a:ProductionReference>
                        <a:Subcontractor i:nil="true"/>
                        <a:TimeDelivered>0001-01-01T00:00:00</a:TimeDelivered>
                        <a:TimePrices>0001-01-01T00:00:00</a:TimePrices>
                        <a:TimeProduction>0001-01-01T00:00:00</a:TimeProduction>
                        <a:TimeReOrder>0001-01-01T00:00:00</a:TimeReOrder>
                        <a:TimeUpload>0001-01-01T00:00:00</a:TimeUpload>
                        <a:TimesOrdered>0</a:TimesOrdered>
                        <a:TrackingCode i:nil="true"/>
                        <a:TransportCode>0</a:TransportCode>
                        <a:TransportName i:nil="true"/>
                     </a:ProductionOrder>
                  </a:ProductionOrders>
                  <a:SoftwareType>FFFKiosk</a:SoftwareType>
                  <a:Source>FFF/FTP</a:Source>
                  <a:SourceReference>963697</a:SourceReference>
                  <a:Time>2013-10-24T12:31:11.133</a:Time>
                  <a:TimeCompleted>2013-10-28T14:58:14.997</a:TimeCompleted>
                  <a:TimeIntake>2013-10-24T11:07:00</a:TimeIntake>
                  <a:TimeReceived>2013-10-24T12:31:00</a:TimeReceived>
                  <a:VersionNumber i:nil="true"/>
               </a:ConsumerOrder>
            </a:ConsumerOrders>
         </GetConsumerOrdersResult>
      </GetConsumerOrdersResponse>
   </s:Body>
</s:Envelope>

 

And this is my code :

xmlString = 'XML above';
		
Dom.Document doc = new Dom.Document();
doc.load(xmlString);
Dom.Xmlnode envelope = doc.getRootElement();
		
for(integer i = 0; i < envelope.getChildElements().size(); i++){
			
	Dom.XMLNode body = envelope.getChildElements()[i];
			
	for(Dom.XMLNode child : body.getChildElements()){
	   System.debug(child.getName());
	   System.debug('+++++ : ' + child.getText());
	}			
}

  I get only this : 

1
GetConsumerOrdersResponse
+++++ : 

 

What is the problem please?

Hello,

 

I try to generate Apex classes from WSDL file but I get this error : Apex Generation Failed Unable to find schema for element; {http://tempuri.org/}GetConsumerOrdersResponse

 

I don't understand why but I think the problem is about namespace?

 

This is my WSDL file : http://www.petit-fichier.fr/2013/11/14/test3/ (too large for this forum)

 

 

Thanks to people who will help me.

Hello,

 

I developped a visualforce chart and sometimes, datas are garbled.

 

Per example, a 10 is displayed as a 11 :

http://nsa33.casimages.com/img/2013/10/21/131021051400896700.png

 

I tried to change the data type to barSeries and it doesn't work.

 

I tried to change the chart's height from 600px to 950px and it doesn't work and I modified chart's options but it doesn't work too.

 

This is my code :

<apex:chart height="550px" width="100%" data="{!datas}" rendered="{!chartVisible}" resizable="true">
    	<apex:legend position="right"/>
        <apex:axis type="Numeric" position="left" fields="data1" minimum="0" maximum="{!maxNbParticipants}" title="Number of participants" grid="true"/>
        <apex:axis type="Category" position="bottom" fields="name" title="">
            <apex:chartLabel rotate="315"/>
        </apex:axis>
        <apex:lineSeries title="{!mapNames[0]}" fill="true" axis="left" xField="name" yField="data1" markerType="circle" markerSize="4" markerFill="#A44065" strokeColor="#A44065" />
        <apex:lineSeries title="{!mapNames[1]}" fill="false" axis="left" xField="name" yField="data2" markerType="circle" markerSize="4" markerFill="#4051A4" strokeColor="#4051A4" />
        <apex:lineSeries title="{!mapNames[2]}" fill="false" axis="left" xField="name" yField="data3" markerType="circle" markerSize="4" markerFill="#5EA440" strokeColor="#5EA440" />
    </apex:chart>

 

 

Why data are garbled please?

 

Thanks for your answers.

Best regards

Hello, I'm developping a test class to cover an Apex class which call a web service.

I have generated the client class thanks to WSDL2Apex with importing the WSDL.

The web service return a XML content which is parsed and transformed in a 'Result' object which contains a lot of others objects.

I have read the documentation (http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_callouts_wsdl2apex_testing.htm (http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_callouts_wsdl2apex_testing.htm" target="_blank)) and it is said to specify a mock response.

Is there a way to give a XML content as a static resource to the mock response to simulate the web service response or I must create a Result object with all values which is the parsed result?

Thanks to advance.
Hi,

any one can explain me, why we use System.assertEqual() and static{ } in test class with example.

Thanks in Advance!!!
  • January 23, 2015
  • Like
  • 0

Hi,
I am trying to update parent event record after the recurring child event records are created.
So, in trigger i am fetching RecurrenceActivityId and query for the  parent event record using RecurrenceActivityId.
During updating the parent event record i am facing internal server error:
An internal server error has occurred An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience.

Below is my trigger code:
trigger DemoEvent on Event (after insert) {
  List<Event> evs = Trigger.new;
  Set<id> ids = new Set<id>();
  System.debug('evs = '+evs);
  for(Event e: evs){
      system.debug('RecurrenceActivityId= '+e.RecurrenceActivityId);
      ids.add(e.RecurrenceActivityId);
  }
 
  System.debug('ids = '+ids);
 
  if(ids.size()>0){
      List<Event> ev = [select id,Description from Event where id in:ids];
      System.debug('Event123 = '+ev);
      for(Event e: ev){
          e.Description='test@test.com';
      }
      
      
      update ev;//Facing internal server error here while updating the parent event record.
  }
}   

Hi All,

I Have a trigger for Contact Object. It sends a HTTP request to external Host. For this request I want to get the, First Name, Last Name and Account Name of that Contact.

In the Contact Object
1. User Name is a combination of PREFIX, FIRST NAME and LAST NAME. 
2. Contact is added under an Account and I want to get the Name of the Account (which was selected when the Contact creation)

This is my Trigger,
 

Contact[] cont = Trigger.new;
    
    for (Contact c :cont){
        myRequestSendingClass.sendRequest(c.Account.Name, c.Name);
    }
I tryied to access the Account name by
c.Account.Name
And I tried to accress the Contact name (combination) by
c.Name

But both of them returns NULL.

 

How can I get these values from the Contact object?

Please Help Me. Thankyou in advance.

Hello,

I'm developing an application which use an external webservice and when I call him, I get this error message :
System.CalloutException: Endpoint is not valid

I don't understand what is wrong because if I try this URL in the browser, it works.

This is the endpoint : https://maps.googleapis.com/maps/api/geocode/json?address=+94+Rue+de+Provence+75009+Paris+france&components=country:france&#124;postal_code:75009&language=france

I don't understand why but this endpoint works :
https://maps.googleapis.com/maps/api/geocode/json?address=+94+Rue+de+Provence+Paris+france&components=country:france&language=france

I use the Google's API to normalize addresses and it works if I don't use the postal code or the country in the same time.
Postal code + ountry = doesn't work
Postal code = works
Country = works

I created a remote site in Salesforce.com and it is active : https://maps.googleapis.com

If I enter the endpoint (full, postal code with the country) in the Google browser, it works..

Please help mep, I feel crazy.. :
Hello,

I'm developing a Visualforce page with a controller and I've a problem in the 'rendered' markup.

When a user click on a button, he calls a controller method and then the results displays themselves in the visualforce page if a variable equals to true and a variable equals to false.

This is my controller :
 
public PageReference searchForm(){
        
        try{
            this.attributionList = this.getAttributionsList(this.anAttributionToSearch);
        
            this.clickToSearch = true;        
            this.clickToCreate = false;
            this.hasSearched = true;
        }catch(Exception e){
            this.displayErrorMessage(e.getMessage());
        }
        
        return null;
    }




And my Visualforce page :
 
<apex:form>
   <apex:commandButton action="{!searchForm}" value="{!$Label.Labs_Sf_Search_Button}" rerender="theTabPanel" status="actionPopup"/>
</apex:form>

<apex:pageBlock title="{!SUBSTITUTE($Label.Labs_Sf_Number_Of_Results, '#', TEXT(attributionList.size))}" rendered="{!IF(!clickToCreate && clickToSearch, true, false)}">

...

</apex:pageBlock>




I don't understand why my condition doesn't work? :(
The pageBlock never displays himself.

Thanks for the help.
Hello,

I've created a Salesforce Community and I would like see cases.

Unfortunately, when I connect myself with a user, I can't see the user's cases however cases are private.

What can I do to see them please?

Thank for the answers.
Hello, I'm trying to use a custom link in a page layout in Salesforce which execute a Javascript redirection.

It works in Salesforce but not in Salesforce1 (Android phone), why?

That's my code in the custom link :
document.location.href="https://cs18.salesforce.com/00U/e?who_id=*****";



I can't get an answer on the internet. :/

Thank for the help.
 
Hello all,

I'm developping a batch which send emails to a contact List but it doesn't work and I'm getting all time this error :
[code]
INVALID_FIELD_WHEN_USING_TEMPLATE, When a template is specified the plain text body, html body, subject and charset may not be specified : []
[/code]

And below, my code :
[code]
List<EmailTemplate> emailTemplateList = [
      SELECT Id
      FROM EmailTemplate
      WHERE DeveloperName = :emailTemplateName
];

List<Messaging.SingleEmailMessage> emailsToSend = new List<Messaging.SingleEmailMessage>();

for(Contact aContact : contactList){
                        
      Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
                            
      mail.setTargetObjectId(aContact.Id);
                        
      mail.setOrgWideEmailAddressId(oweaMap.get(emailMap.get(aRegion)).Id);
                    
      mail.setSubject(mailSubject);
                        
      mail.setSaveAsActivity(false);
                        
      mail.setBccSender(false);
                        
      mail.setUseSignature(false);
                        
      mail.setCharset('UTF-8');
                                                
      mail.setTemplateId(emailTemplateList[0].Id);
                        
      emailsToSend.add(mail);
}

Messaging.sendEmail(emailsToSend);
[/code]

The error is on the last line : Messaging.sendEmail(emailsToSend);

I've trying in selecting Body, HtmlValue and Subject field on the EmailTemplate object but it doesn't work..

What's wrong please?
Hello, I would like migrate from a portal to a community but I don't know how proced.

I have readed the documentation (http://help.salesforce.com/help/pdfs/en/salesforce_portal_to_community_migration_cheatsheet.pdf) an others articles but it's not explicated how migrate.

Where can I find a turorial to do the migration please?
Hello,

I am using a community and I am using a rich text field to display an image but in the community, this image is not displaying, I get this :

User-added image

To display my image, I use the <apex:outputText escape="false" /> tag.

I checked the accessibility of my field and all is good.

Have I forgotten to check some thing please?

Best regards
Hello, I'm developping a test class to cover an Apex class which call a web service.

I have generated the client class thanks to WSDL2Apex with importing the WSDL.

The web service return a XML content which is parsed and transformed in a 'Result' object which contains a lot of others objects.

I have read the documentation (http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_callouts_wsdl2apex_testing.htm (http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_callouts_wsdl2apex_testing.htm" target="_blank)) and it is said to specify a mock response.

Is there a way to give a XML content as a static resource to the mock response to simulate the web service response or I must create a Result object with all values which is the parsed result?

Thanks to advance.

Hello, is it possible to configure Salesforce knowledge base to be accessible with an unauthenticated customer from a Salesforce community?

 

I tested the 'Sample Public Knowledge Base for Salesforce Knowledge' (https://appexchange.salesforce.com/listingDetail?listingId=a0N30000001gFH9EAM&tab=r) app from the Appexchange but I don't see my knowledge article in the visualforce page 'knowledgeHome' because my Site.getName() is null.

 

Thanks for the response.

Hello, Salesforce can't parse my WSDL file cause it doesn't find binding, this is my error : Error: Failed to parse wsdl: Failed to parse WSDL: Unable to find binding {http://schemas.datacontract.org/2004/07/FujiTTModel/}basicHttpFujiTTWebService. Found basicHttpFujiTTWebService instead.

 

And this is my WSDL file :

<?xml version="1.0" encoding="iso-8859-1"?>
<wsdl:definitions 
	name="FujiTTWebService" 
	targetNamespace="http://tempuri.org/" 
	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
	xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" 
	xmlns:wsa10="http://www.w3.org/2005/08/addressing" 
	xmlns:tns="http://schemas.datacontract.org/2004/07/FujiTTModel/" 
	xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" 
	xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" 
	xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" 
	xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" 
	xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" 
	xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" 
	xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" 
	xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" 
	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
	xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
		<wsdl:types>
				<xs:schema targetNamespace="http://schemas.datacontract.org/2004/07/FujiTTModel" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
						
.....

				</xs:schema>
		</wsdl:types>
		<wsdl:message name="IFujiTTService_Hello_InputMessage">
				<wsdl:part name="parameters" element="tns:Hello" />
		</wsdl:message>
		<wsdl:message name="IFujiTTService_Hello_OutputMessage">
				<wsdl:part name="parameters" element="tns:HelloResponse" />
		</wsdl:message>
		<wsdl:message name="IFujiTTService_GetConsumerOrders_InputMessage">
				<wsdl:part name="parameters" element="tns:GetConsumerOrders" />
		</wsdl:message>
		<wsdl:message name="IFujiTTService_GetConsumerOrders_OutputMessage">
				<wsdl:part name="parameters" element="tns:GetConsumerOrdersResponse" />
		</wsdl:message>
		<wsdl:message name="IFujiTTService_GetConsumerOrdersByDealer_InputMessage">
				<wsdl:part name="parameters" element="tns:GetConsumerOrdersByDealer" />
		</wsdl:message>
		<wsdl:message name="IFujiTTService_GetConsumerOrdersByDealer_OutputMessage">
				<wsdl:part name="parameters" element="tns:GetConsumerOrdersByDealerResponse" />
		</wsdl:message>
		<wsdl:portType name="IFujiTTService">
				<wsdl:operation name="Hello">
						<wsdl:input wsaw:Action="http://tempuri.org/IFujiTTService/Hello" message="tns:IFujiTTService_Hello_InputMessage" />
						<wsdl:output wsaw:Action="http://tempuri.org/IFujiTTService/HelloResponse" message="tns:IFujiTTService_Hello_OutputMessage" />
				</wsdl:operation>
				<wsdl:operation name="GetConsumerOrders">
						<wsdl:input wsaw:Action="http://tempuri.org/IFujiTTService/GetConsumerOrders" message="tns:IFujiTTService_GetConsumerOrders_InputMessage" />
						<wsdl:output wsaw:Action="http://tempuri.org/IFujiTTService/GetConsumerOrdersResponse" message="tns:IFujiTTService_GetConsumerOrders_OutputMessage" />
				</wsdl:operation>
				<wsdl:operation name="GetConsumerOrdersByDealer">
						<wsdl:input wsaw:Action="http://tempuri.org/IFujiTTService/GetConsumerOrdersByDealer" message="tns:IFujiTTService_GetConsumerOrdersByDealer_InputMessage" />
						<wsdl:output wsaw:Action="http://tempuri.org/IFujiTTService/GetConsumerOrdersByDealerResponse" message="tns:IFujiTTService_GetConsumerOrdersByDealer_OutputMessage" />
				</wsdl:operation>
		</wsdl:portType>
		<wsdl:binding name="basicHttpFujiTTWebService" type="tns:IFujiTTService">
				<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
				<wsdl:operation name="Hello">
						<soap:operation soapAction="Hello" style="document" />
						<wsdl:input>
								<soap:body use="literal" />
						</wsdl:input>
						<wsdl:output>
								<soap:body use="literal" />
						</wsdl:output>
				</wsdl:operation>
				<wsdl:operation name="GetConsumerOrders">
						<soap:operation soapAction="GetConsumerOrders" style="document" />
						<wsdl:input>
								<soap:body use="literal" />
						</wsdl:input>
						<wsdl:output>
								<soap:body use="literal" />
						</wsdl:output>
				</wsdl:operation>
				<wsdl:operation name="GetConsumerOrdersByDealer">
						<soap:operation soapAction="GetConsumerOrdersByDealer" style="document" />
						<wsdl:input>
								<soap:body use="literal" />
						</wsdl:input>
						<wsdl:output>
								<soap:body use="literal" />
						</wsdl:output>
				</wsdl:operation>
		</wsdl:binding>
		<wsdl:service name="FujiTTWebService">
				<wsdl:port name="basicHttpFujiTTWebService" binding="tns:basicHttpFujiTTWebService">
						<soap:address location="http://62.180.227.66:1024/FujiTTServiceLibrary" />
				</wsdl:port>
		</wsdl:service>
</wsdl:definitions>

Why it doesn't find the tns's namespace whereas it is defined into the wsdl's definitions?

 

Thank for the answers.

Hello, I try to parse a web service's XML response in reading the documentation (http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_xml_dom.htm) but it doesn't work whereas my XML is valid.

 

This is my XML response :

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <GetConsumerOrdersResponse xmlns="http://tempuri.org/">
         <GetConsumerOrdersResult xmlns:a="http://schemas.datacontract.org/2004/07/FujiTTModel" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <a:ConsumerOrders>
               <a:ConsumerOrder>
                  <a:ActionCode i:nil="true"/>
                  <a:Campaign i:nil="true"/>
                  <a:Consumer>
                     <a:Company i:nil="true"/>
                     <a:ConsumerId>e27dc-6e93-483f-bf14-fe01e477fc7b</a:ConsumerId>
                     <a:Email i:nil="true"/>
                     <a:ExternalId i:nil="true"/>
                     <a:FirstName i:nil="true"/>
                     <a:InvoiceAddress>
                        <a:AddressLine1 i:nil="true"/>
                        <a:AddressLine2 i:nil="true"/>
                        <a:AddressLine3 i:nil="true"/>
                        <a:AddressNumber i:nil="true"/>
                        <a:AddressNumberExtension i:nil="true"/>
                        <a:City i:nil="true"/>
                        <a:Company i:nil="true"/>
                        <a:Country i:nil="true"/>
                        <a:FirstName i:nil="true"/>
                        <a:LastName i:nil="true"/>
                        <a:State i:nil="true"/>
                        <a:Title i:nil="true"/>
                        <a:ZipCode i:nil="true"/>
                     </a:InvoiceAddress>
                     <a:Language i:nil="true"/>
                     <a:LastName>BARBARA BABA</a:LastName>
                     <a:ShippingAddress i:nil="true"/>
                     <a:Telephone i:nil="true"/>
                     <a:Title i:nil="true"/>
                  </a:Consumer>
                  <a:Dealer>
                     <a:Address>16, Rue de la merveille</a:Address>
                     <a:City>BOIS</a:City>
                     <a:Country>FR</a:Country>
                     <a:DealerId>8ff5-8715-48e3-9688-723039d3f212</a:DealerId>
                     <a:Email i:nil="true"/>
                     <a:LabCode>33</a:LabCode>
                     <a:Language i:nil="true"/>
                     <a:Name>Imaging France</a:Name>
                     <a:Number>7651</a:Number>
                     <a:ShippingCode>?-0494</a:ShippingCode>
                     <a:Telephone i:nil="true"/>
                     <a:Zipcode>78391</a:Zipcode>
                  </a:Dealer>
                  <a:Discount>0</a:Discount>
                  <a:ExternalId i:nil="true"/>
                  <a:IsMailOrder>false</a:IsMailOrder>
                  <a:LabCode>33</a:LabCode>
                  <a:Make>FFF</a:Make>
                  <a:MessageList i:nil="true"/>
                  <a:OrderSize>30634986</a:OrderSize>
                  <a:ParentFileId>62f1c94d-c967-49c8-8758-e32987422e3</a:ParentFileId>
                  <a:ProductList i:nil="true"/>
                  <a:ProductionOrders>
                     <a:ProductionOrder>
                        <a:BackupPath>\\fujife10\Backup-2013-10-24-55996</a:BackupPath>
                        <a:DateToShip>2013-10-28T17:00:00</a:DateToShip>
                        <a:DeliveryNoteList i:nil="true"/>
                        <a:FileId>62f1c94d-c967-49c8-8758-e32875f4b2e3</a:FileId>
                        <a:IsConfirmed>true</a:IsConfirmed>
                        <a:IsErrorFlagged>false</a:IsErrorFlagged>
                        <a:IsPriced>true</a:IsPriced>
                        <a:IsProduced>true</a:IsProduced>
                        <a:LabDays>0</a:LabDays>
                        <a:MessageList i:nil="true"/>
                        <a:PartNumber>0</a:PartNumber>
                        <a:PartsTotal>0</a:PartsTotal>
                        <a:ProductList i:nil="true"/>
                        <a:ProductionReference>55996</a:ProductionReference>
                        <a:Subcontractor i:nil="true"/>
                        <a:TimeDelivered>0001-01-01T00:00:00</a:TimeDelivered>
                        <a:TimePrices>0001-01-01T00:00:00</a:TimePrices>
                        <a:TimeProduction>0001-01-01T00:00:00</a:TimeProduction>
                        <a:TimeReOrder>0001-01-01T00:00:00</a:TimeReOrder>
                        <a:TimeUpload>0001-01-01T00:00:00</a:TimeUpload>
                        <a:TimesOrdered>0</a:TimesOrdered>
                        <a:TrackingCode i:nil="true"/>
                        <a:TransportCode>0</a:TransportCode>
                        <a:TransportName i:nil="true"/>
                     </a:ProductionOrder>
                  </a:ProductionOrders>
                  <a:SoftwareType>FFFKiosk</a:SoftwareType>
                  <a:Source>FFF/FTP</a:Source>
                  <a:SourceReference>963697</a:SourceReference>
                  <a:Time>2013-10-24T12:31:11.133</a:Time>
                  <a:TimeCompleted>2013-10-28T14:58:14.997</a:TimeCompleted>
                  <a:TimeIntake>2013-10-24T11:07:00</a:TimeIntake>
                  <a:TimeReceived>2013-10-24T12:31:00</a:TimeReceived>
                  <a:VersionNumber i:nil="true"/>
               </a:ConsumerOrder>
            </a:ConsumerOrders>
         </GetConsumerOrdersResult>
      </GetConsumerOrdersResponse>
   </s:Body>
</s:Envelope>

 

And this is my code :

xmlString = 'XML above';
		
Dom.Document doc = new Dom.Document();
doc.load(xmlString);
Dom.Xmlnode envelope = doc.getRootElement();
		
for(integer i = 0; i < envelope.getChildElements().size(); i++){
			
	Dom.XMLNode body = envelope.getChildElements()[i];
			
	for(Dom.XMLNode child : body.getChildElements()){
	   System.debug(child.getName());
	   System.debug('+++++ : ' + child.getText());
	}			
}

  I get only this : 

1
GetConsumerOrdersResponse
+++++ : 

 

What is the problem please?

Hello,

 

I try to generate Apex classes from WSDL file but I get this error : Apex Generation Failed Unable to find schema for element; {http://tempuri.org/}GetConsumerOrdersResponse

 

I don't understand why but I think the problem is about namespace?

 

This is my WSDL file : http://www.petit-fichier.fr/2013/11/14/test3/ (too large for this forum)

 

 

Thanks to people who will help me.

Hello,

 

I developped a visualforce chart and sometimes, datas are garbled.

 

Per example, a 10 is displayed as a 11 :

http://nsa33.casimages.com/img/2013/10/21/131021051400896700.png

 

I tried to change the data type to barSeries and it doesn't work.

 

I tried to change the chart's height from 600px to 950px and it doesn't work and I modified chart's options but it doesn't work too.

 

This is my code :

<apex:chart height="550px" width="100%" data="{!datas}" rendered="{!chartVisible}" resizable="true">
    	<apex:legend position="right"/>
        <apex:axis type="Numeric" position="left" fields="data1" minimum="0" maximum="{!maxNbParticipants}" title="Number of participants" grid="true"/>
        <apex:axis type="Category" position="bottom" fields="name" title="">
            <apex:chartLabel rotate="315"/>
        </apex:axis>
        <apex:lineSeries title="{!mapNames[0]}" fill="true" axis="left" xField="name" yField="data1" markerType="circle" markerSize="4" markerFill="#A44065" strokeColor="#A44065" />
        <apex:lineSeries title="{!mapNames[1]}" fill="false" axis="left" xField="name" yField="data2" markerType="circle" markerSize="4" markerFill="#4051A4" strokeColor="#4051A4" />
        <apex:lineSeries title="{!mapNames[2]}" fill="false" axis="left" xField="name" yField="data3" markerType="circle" markerSize="4" markerFill="#5EA440" strokeColor="#5EA440" />
    </apex:chart>

 

 

Why data are garbled please?

 

Thanks for your answers.

Best regards