• kevinvw2000
  • NEWBIE
  • 35 Points
  • Member since 2010

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 5
    Replies

I would like to add a picklist control to a visual force, but I don't want it to be tied to a data field.

I just want the field to have to values - "Yes" and "No".

When the user picks a value and submits the page I want to be able to reference the choice in the controller class.


Is this possible?

 

Thanks.

I seem to be having an issue with the Encrypt or decrypt portion of the password process. From what i read on the return from command prompt, it knows the first two characters in my password and decrypts it properly ("Sh") but it seems to have a problem with something after this point??? Or i could be completely crazy...

 

Might anyone be able to shed some light? Did i encrypt wrong? Is it recquired to have a key file? If so, where am i supposed to place it?

 

Any help would be appreciated.

834 [main] FATAL com.salesforce.dataloader.process.ProcessRunner  - Unable to ru
n process UofUAccountExtractToCSV
java.lang.RuntimeException: com.salesforce.dataloader.exception.ParameterLoadExc
eption: Error loading parameter: sfdc.password of type: java.lang.String
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
a:136)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
a:74)
        at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.ja
va:226)
Caused by: com.salesforce.dataloader.exception.ParameterLoadException: Error loa
ding parameter: sfdc.password of type: java.lang.String
        at com.salesforce.dataloader.config.Config.decryptProperty(Config.java:6
83)
        at com.salesforce.dataloader.config.Config.postLoad(Config.java:620)
        at com.salesforce.dataloader.config.Config.loadParameterOverrides(Config
.java:646)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
a:94)
        ... 2 more
Caused by: java.lang.NumberFormatException: For input string: "Sh"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.
java:48)
        at java.lang.Integer.parseInt(Integer.java:447)
        at java.lang.Integer.valueOf(Integer.java:526)
        at java.lang.Integer.decode(Integer.java:919)
        at com.salesforce.dataloader.security.EncryptionUtil.textToBytes(Encrypt
ionUtil.java:58)
        at com.salesforce.dataloader.security.EncryptionUtil.decryptString(Encry
ptionUtil.java:194)
        at com.salesforce.dataloader.config.Config.decryptProperty(Config.java:6
68)

 process-conf.xml looks like this:

 

<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>

    <bean id="UofUAccountExtractToCSV"
          class="com.salesforce.dataloader.process.ProcessRunner"
          singleton="false">
      <description>Gets the UofU accounts with clients and exports to CSV"</description>
        <property name="name" value="UofUAccountExtractToCSV"/>
        <property name="configOverrideMap">
            <map>
                <entry key="sfdc.debugMessages" value="false"/>
                <entry key="sfdc.debugMessagesFile" value="c:\Salesforce\DataLoader\Resources\Logs\SFDCdebug.log"/>
                <entry key="sfdc.endpoint" value="https://login.salesforce.com"/>
                <entry key="sfdc.username" value="sfdcusername"/>
		<entry key="sfdc.password" value="value returned by encrypt.bat -e"/>
                <entry key="sfdc.timeoutSecs" value="600"/>
                <entry key="sfdc.loadBatchSize" value="200"/>
                <entry key="sfdc.entity" value="Client__c"/>
                <entry key="sfdc.extractionSOQL" value="SELECT c.LIS_Account_Name__c, c.Entity_Code__c,c.ClientID_Ext_Id__c, c.Phone_and_Extension__c, c.Secured_Fax__c, c.Comments__c,c.Street_Address__c, c.City__c, c.State__c, c.account__r.name from client__c c where c.account__r.recordtypeid ='012C0000000Q7lIIAS'"/>
                <entry key="process.operation" value="extract"/>
                <entry key="process.mappingFile" value="c:\Salesforce\DataLoader\Resources\Mapping\UofUAccountExtractMap.sdl"/>
                <entry key="process.outputError" value="c:\Salesforce\DataLoader\Resources\Logs\LastOperationError.csv"/>
    		<entry key="dataAccess.writeUTF8" value="true"/>            
		<entry key="dataAccess.type" value="csvWrite"/>
                <entry key="dataAccess.name" value="c:\Salesforce\DataLoader\Resources\Data\UofUSFDCExtract.csv"/>
            </map>
        </property>
    </bean>
</beans>

 

 

 

I have a trigger that runs on updated (converted) leads, so I need to be able to emulate that process in my Apex test class in order to test correctly. I've followed the documentation as instructed Here, but I'm getting an error during test execution that I'm not sure how to fix.

/*
* Test class for the TransferIndustryContacts trigger 
*/
public with sharing class Test_TransferIndustryContacts {

	//Declare test method
	public static testmethod void doTest() {
		
		//Create a new lead that will be converted into a new account and contact
		Lead newLead = new Lead(lastname = 'Test1_Lname', company='Test1_Acct');
		insert newLead;
		
		//Create the LeadConvert object
		Database.LeadConvert lc = new database.LeadConvert();
		
		//Set the newly inserted lead as the target to this LeadConvert
		lc.setLeadId(newLead.id);
		
		//Set the required ConvertedStatus field
		LeadStatus convertStatus = [Select Id, MasterLabel from LeadStatus where IsConverted = true limit 1];
		lc.setConvertedStatus(convertStatus.MasterLabel);
		
		//execute lead conversion
		Database.LeadConvertResult lcr = Database.convertLead(lc);
		
		//Confirm that the new contact belongs to the correct account
		//as assigned by the trigger (Account ID = 00100000005Q96h)
		Contact newContact = [SELECT Id, AccountId FROM Contact WHERE Id = :lcr.getContactId()];
		System.assert(newContact.AccountId == '00100000005Q96h');
	}

}

 The error occurs on the line that performs the database.convertLead() method, but the error it throws is:

 

"INVALID_STATUS, invalid convertedStatus: Qualified --> Account: []"

 

I know "Qualified --> Account"  is what is getting returned by the query to LeadStatus, but the option is a valid for the converted status during the lead conversion in the UI. I also tried hard coding in another option from this list to no avail. Any suggestions?

 

 

Maybe I am overlooking the obvious here...

 

I have 2 objects Obj1 and Obj2  that are related by 2 fields (fld1 and fld2)

 

I have List<Obj1>  which contains records and I have List<Obj2> which contains records.

 

I want to create a 3rd list that contains only records from Obj1 where Obj1.fld1 = Obj2.fld1 AND Obj1.fld2 = Obj2.fld2

 

In basic sql it would be 2 joins between the 2 tables.

 

Any help would be greatly appreciated.

 

Thanks!

I am receiving this error from a  trigger code for lead object, When attempting to do a lead conversion.
 
"execution of AfterUpdate caused by: System.DmlException: Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id"
 
Failed while -->  inserting campaignMembers.
(Note: campain member creation requires 2 ids --> new CampaignMember(leadid=leadID,campaignid=leadID))
 
I am confused as why this error is happening only while doing -- lead conversion
And not when-->a) Doing unit testing of trigger using Apex classes
                           b) Sending a bunch of leads from an external application for testing.
 
I was logged in always as the user that I had tested succesfully the trigger code.
Also, I believe that I have All required permissions.
 
Any suggestions to resolve?