• jminardo
  • NEWBIE
  • 0 Points
  • Member since 2007

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

I have a variable number of records stored on a VF page in a Javascript array of custom javascript objects.  I need to pass these records back to my Apex controller class.  I know that the Javascript on the VF page is less than ideal, but it's what I must do.  Any suggestions on the cleanest and simplest way to get the js array back into the controller?

I have a multiselect selectList like so:

 

 

<apex:page controller="config_mylist">
<apex:form>
.
.
.
<apex:selectList id="mylist_list" required="false" value="{!MYLIST}" multiselect="true">
     <apex:selectOptions value="{!MYLIST_OPTIONS}" />
</apex:selectList>
.
.
.
</apex:form>
</apex:page>

 

 

The controller populates the list like so:

 

 

public class config_mylist {
.
.
.
List<String> MYLIST_OPTIONS;
String[] MYLIST;
.
.
.
    public config_mylist() { }
.
.
.
    public String[] getMYLIST() {
        return MYLIST;
    }
    
    public void setMYLIST(String[] x) {
        MYLIST = x;
    }


    public List<SelectOption> getMYLIST_OPTIONS() {
        List<SelectOption> options = new List<SelectOption>();
        List<CaseTeamRole> MYLIST_OPTIONS;
        MYLIST_OPTIONS = [select Id, Name from CaseTeamRole];
        if(MYLIST_OPTIONS.Size() > 0){
            for(CaseTeamRole c:MYLIST_OPTIONS){
                if(c.Name != null){
                    options.add(new SelectOption(c.ID, c.Name));
                }
            }
        }
        return options;
    }
.
.
.
}

 

 

There's a Save button on the page that uses a custom function in the controller to insert a key/value pair into a custom object, so I'm trying to turn the selectList selections into a single comma-separated string value:

 

 

    String MYLIST_string;
    for(String i:MYLIST){
    	MYLIST_string = MYLIST_string + i + ',';
    }
    insertValue('MYLIST_KEYNAME', MYLIST_string);

 

However, when I select any values from the list and hit the save button, I get the error "Conversion Error setting value 'Option1234' for '#{MYLIST}'."  That's for the option selected with value Option1234.  If I pick that one and Option9876, I'll get "Conversion Error setting value 'Option1234 Option9876' for '#{MYLIST}'."  No commas there.  I can't really figure out what the problem is, any ideas?

 

Hi all, hope someone can offer some help.

I'm trying to run an extract operation from the command line using Data Loader 10.0.  I'm extracting to a CSV file.  I have my process-conf.xml, my SDL map file, and my config.properties files all in order.

At runtime, I'm told my operation was successful, and the correct number of records is reported.  However, when I view the destination CSV file, I have the correct number of fields and rows, as well as correct header row, but the field values are all blank.

Any ideas?

Thanks!
I am running the Dataloader from the command line to extract records from the account object.
 
The following is the process-conf file:
 
Code:
<!DOCTYPE beans (View Source for full doctype...)> 
- <beans default-lazy-init="false" default-autowire="no" default-dependency-check="none">
- <bean id="csvAccountExtractProcess" class="com.salesforce.lexiloader.process.ProcessRunner" singleton="false" lazy-init="default" autowire="default" dependency-check="default">
  <description>csvAccountExtract job gets account info from salesforce and saves info into a CSV file."</description> 
  <property name="name" value="csvAccountExtract" /> 
- <property name="configOverrideMap">
- <map>
  <entry key="sfdc.debugMessages" value="true" /> 
  <entry key="sfdc.debugMessagesFile" value="D:\SFDC\DataLoader\conf\MVJTrace.log" /> 
  <entry key="sfdc.endpoint" value="https://www.salesforce.com" /> 
  <entry key="sfdc.username" value="USERNAME" /> 
  <entry key="sfdc.password" value="PASSWORD" /> 
  <entry key="sfdc.timeoutSecs" value="600" /> 
  <entry key="sfdc.loadBatchSize" value="200" /> 
  <entry key="sfdc.entity" value="Account" /> 
  <entry key="sfdc.extractionRequestSize" value="500" /> 
  <entry key="sfdc.extractionSOQL" value="Select Id, Name FROM Account" /> 
  <entry key="process.operation" value="extract" /> 
  <entry key="process.mappingFile" value="D:\SFDC\DataLoader\conf\MVJ_accountExtractMap.sdl" /> 
  <entry key="process.encryptionKeyFile" value="D:\SFDC\DataLoader\conf\MVJ.key" /> 
  <entry key="dataAccess.type" value="csvWrite" /> 
  <entry key="dataAccess.name" value="D:\SFDC\DataLoader\conf\MVJ_extract.csv" /> 
  </map>
  </property>
  </bean>
  </beans>

 How do I incorporate the last run date from the config.properties file into the SOQL to only pick up accounts updated since the last time the job was run?
  • October 25, 2007
  • Like
  • 0
Hi all, hope someone can offer some help.

I'm trying to run an extract operation from the command line using Data Loader 10.0.  I'm extracting to a CSV file.  I have my process-conf.xml, my SDL map file, and my config.properties files all in order.

At runtime, I'm told my operation was successful, and the correct number of records is reported.  However, when I view the destination CSV file, I have the correct number of fields and rows, as well as correct header row, but the field values are all blank.

Any ideas?

Thanks!