• alex_from_paris
  • NEWBIE
  • 25 Points
  • Member since 2010

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 17
    Replies

Hi

I have quite an easy need but I can't find a way to "massify" this request : issue from the fact that I have a parameter in my query specific to each Campaign_Commander_Account__c

It can be done either in a batch or in a trigger or ... so don't hesitate

I have about 7000 Campaign_Commander_Account__c object and about 300 Campaigns_Daily_Summary__c are attached to each Campaign_Commander_Account__c (so 210000 Campaigns_Daily_Summary__c : it can hit 50000 select row limit)

 

List<Campaign_Commander_Account__c> myccmdaccount_list=[select id,  Contract_Start_Date__c from Campaign_Commander_Account__c where Contract_Start_Date__c!=null];

AggregateResult[] groupedResults;

for (Campaign_Commander_Account__c myccmdaccount:myccmdaccount_list)

{  

groupedResults=[SELECT SUM(Number_of_messages_sent__c)nums from Campaigns_Daily_Summary__c where Date_Summary__c>=:myccmdaccount.Contract_Start_Date__c and  Campaign_Commander_Account_ID__c=:myccmdaccount.id]; 

 

myccmdaccount.Total_Message_sent__c=double.valueOf(groupedResults[0].get('nums'));

}

update myccmdaccount_list;

 

Thanks for your help

Regards

Hello

I would like to develop this in Visualforce

 

How can I have clickable link (like edit) : apex:outputLink does not work

<apex:page controller="myExtension">

<apex:pageBlock title="Account">

<apex:pageBlockTable value="{!myaccount}" var="myitem">

<apex:outputLink value="https://cs7.salesforce.com/{!myitem.id}/e">Edit</apex:outputLink>

<apex:column value="{!myitem.Name}"/> <apex:column value="{!myitem.fax}"/>

</apex:pageBlockTable> </apex:pageBlock>

</apex:page>

 

Thanks for your help

Hello

I would like to get link of chatter image for a given user

Where is stored the link of a chatter image : https://c.eu1.content.force.com/profilephoto/729D0000000TTYk/F ?

What is "729" object type in salesforce database ?

Thanks for your help

Regards

Alex

Hello

I would like to create a visualforce page with SF dashboard

How can I do that ?

Iframe solution is not nice <iframe src='https://eu1.salesforce.com/01ZD0000000hNvH'/>

I don't want to rebuild the dashboard with google vizualisation or jquery

Thanks for your help

Regards

Hello
I would like to have a report like this but I could not do it with SF report (matrix only count activities)
So the idea would be to build a SF Site
Question is : which visualforce object should I use to have this result ?

Hi

I am a newbe on visualforce and controller so I hope an expert can answer me quickly

My issue is in class campaign_member_set,  mycontact.Email does not exist or mylead.Email

So how do I get new input from my user ?

I can only update mycampaignmember with no error

 

Here is my controller code

public class EventController {

    private String myid;
    private Contact mycontact;
    private Account myaccount;
    private Lead mylead;
    private CampaignMember mycampaignmember;
    private Campaign mycampaign;
    String itsacontact;
    String itsalead;
    String initialemail;

    // Extract ID of URL
    public EventController ()
    {
        myid= ApexPages.currentPage().getParameters().get('id');
        mycampaignmember= [select CampaignId, ContactId, LeadId from CampaignMember where id=:myid];
        if (mycampaignmember.ContactId != null)
        {
            itsacontact='true';
            itsalead='false';
        }
        else
        {
            itsacontact='false';
            itsalead='true';
        }
           
    }
   
    public String getitsacontact() {
              return itsacontact;
    }
   
    public String getitsalead() {
              return itsalead;
    }
 
   
    // Liste des options AM,PM,All day
    List<String> Event_selection= new List<String>();
    public void setEvent_selection(String[] Event_selection)
    {
        this.Event_selection = Event_selection;
    }
 
    public String[] getEvent_selection()
    {
        return Event_selection;
    }
   
    public List<SelectOption> getEvent_items()
    {
        List<SelectOption> options = new List<SelectOption>();
        if (mycampaign.Option_1_Name__c != null)
        {
        options.add(new SelectOption('1',mycampaign.Option_1_Name__c));
        }
        if (mycampaign.Option_2_Name__c != null)
        {
        options.add(new SelectOption('2',mycampaign.Option_2_Name__c));
        }
        return options;
    }
   
    public CampaignMember getMycampaignmember() {
      mycampaignmember=[select Option_2__c, Option_1__c, Nom_accompagnant__c, Accompagnant__c from CampaignMember where id=:myid];
      return mycampaignmember;
    }
   
    public Contact getMycontact() {
      if (itsacontact=='true')
      {   
          mycampaignmember=[select ContactId from CampaignMember where id=:myid];
          mycontact=[select Phone, LastName, FirstName, Email, AccountId From Contact where id=:mycampaignmember.ContactId];
          initialemail=mycontact.Email;
          return mycontact;
      }
      else
      {
          return null;
      }
     
     
    }
  
   public Account getMyaccount() {
       if (itsacontact=='true')
      {
          mycampaignmember=[select ContactId from CampaignMember where id=:myid];
          mycontact=[select AccountId From Contact where id=:mycampaignmember.ContactId];
          myaccount=[select Name from Account where id=:mycontact.AccountId];
          return myaccount;
      }
      else
      {
      return null;
      }
     
    }
   
    public Lead getMylead() {
       if (itsacontact=='false')
      {
      mycampaignmember=[select LeadId from CampaignMember where id=:myid];
      mylead=[select Phone, LastName, FirstName, Company, Email From Lead where id=:mycampaignmember.LeadId ];
      initialemail=mylead.Email;
      return mylead;
      }
      else
      {
      return null;
      }
     
    }

   
    // Update Campaign or create a lead
    public Pagereference campaign_member_set()
    {
         String newemail;
        
         try{
         update mycampaignmember;
        
         if (itsacontact=='true')
         {
            
newemail=mycontact.Email;
         }
         else
         {
             newemail=mylead.Email;
         }
        
         PageReference p = Page.Success_page;
         p.setRedirect(true);
         return p;
        }
        catch (Exception e)
        {
         PageReference p = Page.Failure_page;
         p.setRedirect(true);
         return p;
        }
        
     }

 

Here is my visualforce page

<apex:page showHeader="false" controller="EventController">
<script>
function setCheck (input) {
     //alert(input.checked);
     //alert(input.value);
     //myname=input.name;
     //document.getElementsByName(myname)[2].checked = true;
}

</script>

 

    <apex:pageBlock rendered="{!itsacontact}">
    <apex:form >
    <apex:panelGrid columns="2">
      Prénom<apex:inputText value="{!mycontact.FirstName}"/><p/>
      Nom <apex:inputText value="{!mycontact.LastName}"/><p/>
      Email <apex:inputText value="{!get .Email}"/><p/>
      Téléphone <apex:inputText value="{!mycontact.Phone}"/><p/>
      Société <apex:inputText value="{!myaccount.Name}"/><p/>
      </apex:panelGrid>
      </apex:form >
     </apex:pageBlock>
    
    <apex:pageBlock rendered="{!itsalead}">
    <apex:form >
    <apex:panelGrid columns="2">
      Prénom<apex:inputText value="{!mylead.FirstName}"/><p/>
      Nom <apex:inputText value="{!mylead.LastName}"/><p/>
      Email <apex:inputText value="{!mylead.Email}"/><p/>
      Téléphone <apex:inputText value="{!mylead.Phone}"/><p/>
      Société <apex:inputText value="{!mylead.Company}"/><p/>
      </apex:panelGrid>
      </apex:form >
     </apex:pageBlock>
     
     <apex:form >
       <apex:selectCheckboxes layout="lineDirection" value="{!Event_selection}" onclick="setCheck (this);">
            <apex:selectOptions value="{!Event_items}" />
       </apex:selectCheckboxes><p/>
      <p/>
      <apex:outputPanel >
        <label>Accompagnée de : </label><input id="option4" type="checkbox"/>
        <apex:inputText value="{!mycampaignmember.Nom_accompagnant__c}"/>
      </apex:outputPanel>
      <p/>
     <apex:commandButton value="Valider" action="{!campaign_member_set}"/>
    </apex:form>
</apex:page>

 

 

Hello

I have a simple problem

I have a list of account

I would like to select them, click on a button, a visualforce page appear with a picklist and then according to selected value, I will update all selected account with this new value

I have developed this behaviour in javascript with a prompt box instead of a picklist

Now I would like to migrate it to visualforce and I can't get the way of having Id of selected account : how do I implement my controller....

It seems to be a simple question but I did not find any doc on that

Thanks for your help on apex and visualforce side

regards

Hello

I am using bulk api to insert object instance in Force.com

I have defined a trigger on before insert, update

 

Map<String, Visite__c> myorgalist = new Map<String, Visite__c>();

for (Visite__c evt : Trigger.new) {
        myorgalist.put(evt.Organization__c,evt);
}

 

for (FAI_Blind__c myorga: [Select Name__c from FAI_Blind__c where Name__c IN :myorgalist.keySet()] )
    {
        Visite__c myvisit=myorgalist.get(myorga.Name__c);
         myvisit.Type__c='FAI BLIND';
         myvisit.Finished__c=true;
     }

 

Insertion works perfectly (job with batches with 100 insert) but when I look at the result in SF, I have some visit that should have been found in my loop and trigger did not found it (TYPE is NOT FOUND : default value).

If I edit the visit and save it, trigger work wells and visit is found in the loop -> Type is changed to FAI BLIND

Do you have any idea of what is going wrong ? Bad script ? Performance issue ?

Do you know a workaround ?

Thanks for your help

Regards

Hello

I would like to add automatically all contact attached to an account as user of my self service portal

Can you confirm me that I have to develop a trigger to add a user to "Selfserviceuser" object ?

What is the action to perform to send him a password when I have added it ? - reset password ? is there an apex function for that ?

Is a soap request : reset password for a given user id works ? Or is it only for my internal user ?

Thanks for your help

Hello

I am using datevalue function to transform a string into date

If string is badly formatted; I have an error

I would like to make a test on datevalue function that will calculate today() date if error and datevalue() if not

How can I catch #error! to perform my test ? there is no esterror(datevalue()) function ?

Thanks for your help

Alex

Hello

I am using SF Soap API

I would like to add carriage return line feed in a long text area

I have tried  <urn1:Log__c>value1\nvalue2</urn1:Log__c> or <urn1:Log__c>value1\r\nvalue2</urn1:Log__c>

And when I go to SF there is no carriage return but \n or \n\r instead of carriage return

What is the solution ?

Thanks for your help

regards

Hello

I have developped a trigger on account "before insert"

If I import account through DataLoader, will this trigger be called ? If no, does "after insert" close work ?

If I import account through Bulk API, will this trigger be called ? If no, does "after insert" close work ?

Thanks for your help

Hello
I have developed a trigger on account "before insert, before update".
It seems that this trigger is not called when I convert a Lead to an Account
How come : it is an insertion ?
How can I activated this trigger ? after insert ?
Thanks for your help
Regards

Hi

This is my code :

 

Map<String, Schema.SObjectField> fieldMap  = Schema.SObjectType.Contact.fields.getMap();
                  List<String> fieldNames=getFieldList(fieldMap);
                  String tmp='';
                  for(String fName:fieldNames)
                 { 
          
                     tmp=tmp+fName;
                 }

...

 

with

 

public List<String> getFieldList(Map<String, Schema.SObjectField> fieldMap) {
        //Make a comma-separated list of the fields
        List<String> fieldList =new List<String>();
        for(String fieldName:fieldMap.keySet()) {
            Schema.DescribeFieldResult fieldDescribe = fieldMap.get(fieldName).getDescribe();
            fieldList.add(fieldDescribe.getName());
        }
        return fieldList;
    }

 

 

It returns me all fields of contact object except boolean like "HasOptedOutOfFax" and other custom boolean fields

What am I doing wrong ?

Thanks for your help

Regards

Hi

I have quite an easy need but I can't find a way to "massify" this request : issue from the fact that I have a parameter in my query specific to each Campaign_Commander_Account__c

It can be done either in a batch or in a trigger or ... so don't hesitate

I have about 7000 Campaign_Commander_Account__c object and about 300 Campaigns_Daily_Summary__c are attached to each Campaign_Commander_Account__c (so 210000 Campaigns_Daily_Summary__c : it can hit 50000 select row limit)

 

List<Campaign_Commander_Account__c> myccmdaccount_list=[select id,  Contract_Start_Date__c from Campaign_Commander_Account__c where Contract_Start_Date__c!=null];

AggregateResult[] groupedResults;

for (Campaign_Commander_Account__c myccmdaccount:myccmdaccount_list)

{  

groupedResults=[SELECT SUM(Number_of_messages_sent__c)nums from Campaigns_Daily_Summary__c where Date_Summary__c>=:myccmdaccount.Contract_Start_Date__c and  Campaign_Commander_Account_ID__c=:myccmdaccount.id]; 

 

myccmdaccount.Total_Message_sent__c=double.valueOf(groupedResults[0].get('nums'));

}

update myccmdaccount_list;

 

Thanks for your help

Regards

Hello

I would like to develop this in Visualforce

 

How can I have clickable link (like edit) : apex:outputLink does not work

<apex:page controller="myExtension">

<apex:pageBlock title="Account">

<apex:pageBlockTable value="{!myaccount}" var="myitem">

<apex:outputLink value="https://cs7.salesforce.com/{!myitem.id}/e">Edit</apex:outputLink>

<apex:column value="{!myitem.Name}"/> <apex:column value="{!myitem.fax}"/>

</apex:pageBlockTable> </apex:pageBlock>

</apex:page>

 

Thanks for your help

Hi I am new to writing test classes. My code coverage is only 65%. Can somebody pls help.

 

The class is:

public class customObjectController{


    public static Integer indexGen {get; set;} //index generator
    public List<CustomObjectWrapper> coList;
    public Integer numRows {get; set;}

    
    /*
     * Wrapper class for holding a 'CustomObjects__c' record and its row index together.
     * The row index is used to delete the row using commandLink
     */
    private class CustomObjectWrapper {
        private CustomObjects__c customObject;
        private Integer index;
     
     
     public CustomObjectWrapper() {
            this.customObject = new CustomObjects__c();
            this.index = indexGen++;
        }
        
        public CustomObjects__c getCustomObject() {
            return customObject;
        }
        
        public Integer getIndex() {
            return index;
        }
    }
        
    /*
     * Constructor
     * -----------
     * Initializes 'coList' and 'numRows'
     */
    public customObjectController(ApexPages.StandardController controller) {
        if(indexGen == null) indexGen = 1;
        coList = new List<CustomObjectWrapper>();
        numRows = 1;
    }
    public List<CustomObjectWrapper> getCoList() {
        return coList;
    }


     
    /*
     * upserts all records currently in the 'coList'
     */
    public PageReference save() {
        if(coList.size()==0)
            return new PageReference('/' + ApexPages.currentPage().getParameters().get('retURL'));
        try {
            List<CustomObjects__c> tempList = new List<CustomObjects__c>();
            for(Integer i=0; i<coList.size(); ++i)
                tempList.add(coList[i].getCustomObject());
            upsert(tempList);
            return new PageReference('/' + ApexPages.currentPage().getParameters().get('retURL'));
        } catch (System.DMLException ex) {
            ApexPages.addMessages(ex);
            return null;
        }
    }
    
    
    
     /*
     * appends new records to the 'coList'.
     * The number of records added is determined by the value of 'numRows'
     * Issues with the method: Not working if mandatory fields are left empty
     */
    public void add() {
          try {
            if(numRows > 0)
                for(Integer i=0; i<numRows; ++i)
                    coList.add(new CustomObjectWrapper());
        } catch (Exception ex) {
             ApexPages.addMessages(ex);
        }
   }
    
    
    /*
     * Clears all records from the 'coList'
     * Issues with the method: Not working if mandatory fields are left empty
     */        
    public void clear(){
        coList.clear();
        numRows = 1;
         }
     

    /*
     * deletes a record from 'coList' depending on the 'index' of 'CustomObjects__c' within the 'CustomObjectWrapper' class
     */
     public void delRecords(){
        try {
            Integer delIndex = Integer.valueOf(ApexPages.currentPage().getParameters().get('delRow'));
            
            for(Integer i=0; i<coList.size(); ++i)
                if(coList[i].index == delIndex) {
                    coList.remove(i);
                    break;
                }
        } catch (Exception ex) {
            ApexPages.addMessages(ex);
        }
    }
    
       
             
   }

Test class;

 

@isTest

public class customObjectController_Test{

public static testMethod void testcls(){
CustomObjects__c cust = new CustomObjects__c();
PageReference pageRef = Page.ReportPage;
Test.setCurrentPageReference(pageRef);
ApexPages.StandardController sc = new ApexPages.StandardController(cust);
customObjectController obj = new customObjectController(sc);
customObjectController.CustomObjectWrapper wra = new customObjectController.CustomObjectWrapper();
obj.save();
obj.add();
obj.clear();
obj.delRecords();
wra.getIndex();
wra.getCustomObject();
}
}

Hello

I would like to create a visualforce page with SF dashboard

How can I do that ?

Iframe solution is not nice <iframe src='https://eu1.salesforce.com/01ZD0000000hNvH'/>

I don't want to rebuild the dashboard with google vizualisation or jquery

Thanks for your help

Regards

Hi

I am a newbe on visualforce and controller so I hope an expert can answer me quickly

My issue is in class campaign_member_set,  mycontact.Email does not exist or mylead.Email

So how do I get new input from my user ?

I can only update mycampaignmember with no error

 

Here is my controller code

public class EventController {

    private String myid;
    private Contact mycontact;
    private Account myaccount;
    private Lead mylead;
    private CampaignMember mycampaignmember;
    private Campaign mycampaign;
    String itsacontact;
    String itsalead;
    String initialemail;

    // Extract ID of URL
    public EventController ()
    {
        myid= ApexPages.currentPage().getParameters().get('id');
        mycampaignmember= [select CampaignId, ContactId, LeadId from CampaignMember where id=:myid];
        if (mycampaignmember.ContactId != null)
        {
            itsacontact='true';
            itsalead='false';
        }
        else
        {
            itsacontact='false';
            itsalead='true';
        }
           
    }
   
    public String getitsacontact() {
              return itsacontact;
    }
   
    public String getitsalead() {
              return itsalead;
    }
 
   
    // Liste des options AM,PM,All day
    List<String> Event_selection= new List<String>();
    public void setEvent_selection(String[] Event_selection)
    {
        this.Event_selection = Event_selection;
    }
 
    public String[] getEvent_selection()
    {
        return Event_selection;
    }
   
    public List<SelectOption> getEvent_items()
    {
        List<SelectOption> options = new List<SelectOption>();
        if (mycampaign.Option_1_Name__c != null)
        {
        options.add(new SelectOption('1',mycampaign.Option_1_Name__c));
        }
        if (mycampaign.Option_2_Name__c != null)
        {
        options.add(new SelectOption('2',mycampaign.Option_2_Name__c));
        }
        return options;
    }
   
    public CampaignMember getMycampaignmember() {
      mycampaignmember=[select Option_2__c, Option_1__c, Nom_accompagnant__c, Accompagnant__c from CampaignMember where id=:myid];
      return mycampaignmember;
    }
   
    public Contact getMycontact() {
      if (itsacontact=='true')
      {   
          mycampaignmember=[select ContactId from CampaignMember where id=:myid];
          mycontact=[select Phone, LastName, FirstName, Email, AccountId From Contact where id=:mycampaignmember.ContactId];
          initialemail=mycontact.Email;
          return mycontact;
      }
      else
      {
          return null;
      }
     
     
    }
  
   public Account getMyaccount() {
       if (itsacontact=='true')
      {
          mycampaignmember=[select ContactId from CampaignMember where id=:myid];
          mycontact=[select AccountId From Contact where id=:mycampaignmember.ContactId];
          myaccount=[select Name from Account where id=:mycontact.AccountId];
          return myaccount;
      }
      else
      {
      return null;
      }
     
    }
   
    public Lead getMylead() {
       if (itsacontact=='false')
      {
      mycampaignmember=[select LeadId from CampaignMember where id=:myid];
      mylead=[select Phone, LastName, FirstName, Company, Email From Lead where id=:mycampaignmember.LeadId ];
      initialemail=mylead.Email;
      return mylead;
      }
      else
      {
      return null;
      }
     
    }

   
    // Update Campaign or create a lead
    public Pagereference campaign_member_set()
    {
         String newemail;
        
         try{
         update mycampaignmember;
        
         if (itsacontact=='true')
         {
            
newemail=mycontact.Email;
         }
         else
         {
             newemail=mylead.Email;
         }
        
         PageReference p = Page.Success_page;
         p.setRedirect(true);
         return p;
        }
        catch (Exception e)
        {
         PageReference p = Page.Failure_page;
         p.setRedirect(true);
         return p;
        }
        
     }

 

Here is my visualforce page

<apex:page showHeader="false" controller="EventController">
<script>
function setCheck (input) {
     //alert(input.checked);
     //alert(input.value);
     //myname=input.name;
     //document.getElementsByName(myname)[2].checked = true;
}

</script>

 

    <apex:pageBlock rendered="{!itsacontact}">
    <apex:form >
    <apex:panelGrid columns="2">
      Prénom<apex:inputText value="{!mycontact.FirstName}"/><p/>
      Nom <apex:inputText value="{!mycontact.LastName}"/><p/>
      Email <apex:inputText value="{!get .Email}"/><p/>
      Téléphone <apex:inputText value="{!mycontact.Phone}"/><p/>
      Société <apex:inputText value="{!myaccount.Name}"/><p/>
      </apex:panelGrid>
      </apex:form >
     </apex:pageBlock>
    
    <apex:pageBlock rendered="{!itsalead}">
    <apex:form >
    <apex:panelGrid columns="2">
      Prénom<apex:inputText value="{!mylead.FirstName}"/><p/>
      Nom <apex:inputText value="{!mylead.LastName}"/><p/>
      Email <apex:inputText value="{!mylead.Email}"/><p/>
      Téléphone <apex:inputText value="{!mylead.Phone}"/><p/>
      Société <apex:inputText value="{!mylead.Company}"/><p/>
      </apex:panelGrid>
      </apex:form >
     </apex:pageBlock>
     
     <apex:form >
       <apex:selectCheckboxes layout="lineDirection" value="{!Event_selection}" onclick="setCheck (this);">
            <apex:selectOptions value="{!Event_items}" />
       </apex:selectCheckboxes><p/>
      <p/>
      <apex:outputPanel >
        <label>Accompagnée de : </label><input id="option4" type="checkbox"/>
        <apex:inputText value="{!mycampaignmember.Nom_accompagnant__c}"/>
      </apex:outputPanel>
      <p/>
     <apex:commandButton value="Valider" action="{!campaign_member_set}"/>
    </apex:form>
</apex:page>

 

 

Hello

I have a simple problem

I have a list of account

I would like to select them, click on a button, a visualforce page appear with a picklist and then according to selected value, I will update all selected account with this new value

I have developed this behaviour in javascript with a prompt box instead of a picklist

Now I would like to migrate it to visualforce and I can't get the way of having Id of selected account : how do I implement my controller....

It seems to be a simple question but I did not find any doc on that

Thanks for your help on apex and visualforce side

regards

Hello

I am using bulk api to insert object instance in Force.com

I have defined a trigger on before insert, update

 

Map<String, Visite__c> myorgalist = new Map<String, Visite__c>();

for (Visite__c evt : Trigger.new) {
        myorgalist.put(evt.Organization__c,evt);
}

 

for (FAI_Blind__c myorga: [Select Name__c from FAI_Blind__c where Name__c IN :myorgalist.keySet()] )
    {
        Visite__c myvisit=myorgalist.get(myorga.Name__c);
         myvisit.Type__c='FAI BLIND';
         myvisit.Finished__c=true;
     }

 

Insertion works perfectly (job with batches with 100 insert) but when I look at the result in SF, I have some visit that should have been found in my loop and trigger did not found it (TYPE is NOT FOUND : default value).

If I edit the visit and save it, trigger work wells and visit is found in the loop -> Type is changed to FAI BLIND

Do you have any idea of what is going wrong ? Bad script ? Performance issue ?

Do you know a workaround ?

Thanks for your help

Regards

Hello

I am using datevalue function to transform a string into date

If string is badly formatted; I have an error

I would like to make a test on datevalue function that will calculate today() date if error and datevalue() if not

How can I catch #error! to perform my test ? there is no esterror(datevalue()) function ?

Thanks for your help

Alex

Hello

I am using SF Soap API

I would like to add carriage return line feed in a long text area

I have tried  <urn1:Log__c>value1\nvalue2</urn1:Log__c> or <urn1:Log__c>value1\r\nvalue2</urn1:Log__c>

And when I go to SF there is no carriage return but \n or \n\r instead of carriage return

What is the solution ?

Thanks for your help

regards

Hello
I have developed a trigger on account "before insert, before update".
It seems that this trigger is not called when I convert a Lead to an Account
How come : it is an insertion ?
How can I activated this trigger ? after insert ?
Thanks for your help
Regards

I'm trying to do a bulk upsert on a Contact object.  Here's the JobInfo XML I am trying to use:

 

<?xml version="1.0" encoding="UTF-8"?>
<jobInfo xmlns="http://www.force.com/2009/06/asyncapi/dataload">
  <operation>upsert</operation>
  <object>Contact</object>
  <contentType>CSV</contentType>
  <externalIdFieldName>External_ID__c</externalIdFieldName>
</jobInfo>

 

When I attempt to create the job I get the error: "Unable to parse Job".  This XML (without the externalIdFieldName) does work for an update operation.  What am I doing wrong here?

 

Thanks,

Steve

Hi

This is my code :

 

Map<String, Schema.SObjectField> fieldMap  = Schema.SObjectType.Contact.fields.getMap();
                  List<String> fieldNames=getFieldList(fieldMap);
                  String tmp='';
                  for(String fName:fieldNames)
                 { 
          
                     tmp=tmp+fName;
                 }

...

 

with

 

public List<String> getFieldList(Map<String, Schema.SObjectField> fieldMap) {
        //Make a comma-separated list of the fields
        List<String> fieldList =new List<String>();
        for(String fieldName:fieldMap.keySet()) {
            Schema.DescribeFieldResult fieldDescribe = fieldMap.get(fieldName).getDescribe();
            fieldList.add(fieldDescribe.getName());
        }
        return fieldList;
    }

 

 

It returns me all fields of contact object except boolean like "HasOptedOutOfFax" and other custom boolean fields

What am I doing wrong ?

Thanks for your help

Regards