• @dsmith_vr
  • NEWBIE
  • 25 Points
  • Member since 2012

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

I'm trying to find a way to read a string into an array (<list>).  I know that I can get the string.Length and then loop through from 1 to Length, but I can't figure out how to get the character at position.loop_counter in the string.  This is for a custom apex controller.

 

Thanks!

 

 

I'm trying to find a way to read a string into an array (<list>).  I know that I can get the string.Length and then loop through from 1 to Length, but I can't figure out how to get the character at position.loop_counter in the string.  This is for a custom apex controller.

 

Thanks!

 

 

Redkite in|force Connector

 

Hi

I connectd with linkdin using redkite inforce connecter from getting appexchange.When i create  contact

and click on linked tab i am getting the error as

 

Visualforce Error

System.NullPointerException: Argument cannot be null. 

 

An unexpected error has occurred. Your solution provider has been notified. (system)

 

any one please suggest me

thanks

 



Hi:

 

  1. I created a simple APEX web service class.
  2. Generated WSDL from the custom class.
  3. Created a Web Service client, in eclipse which generated stub, port and service locator class.

I already have enterprise.jar in my build path. When I am running it I am getting an error. Can someone please let me know where I am going wrong, My connection is working fine. Checked it.

 

package com.nb.sfdc.client;

import java.net.MalformedURLException;
import java.net.URL;
import java.rmi.RemoteException;

import javax.xml.rpc.ServiceException;

import org.apache.axis.AxisFault;

import com.sforce.soap.enterprise.Connector;
import com.sforce.soap.enterprise.EnterpriseConnection;
import com.sforce.soap.enterprise.LoginResult;
import com.sforce.soap.enterprise.fault.LoginFault;
import com.sforce.soap.schemas._class.AccountWebService.AccountWebServiceBindingStub;
import com.sforce.soap.schemas._class.AccountWebService.AccountWebServiceServiceLocator;
import com.sforce.ws.ConnectionException;
import com.sforce.ws.ConnectorConfig;

public class TestAccountWebService {

	/**
	 * @param args
	 */
	
	static ConnectorConfig config = new ConnectorConfig();
	static EnterpriseConnection connection;		
	
	public static void main(String[] args) {
		//Create a salesforce service
		LoginResult loginResult;
		System.out.println("start of program");
		try{
			
			
			config.setNtlmDomain("xxxxxx.com");
			config.setProxy("xxxxxxx.xx.com", 80);
			config.setProxyUsername("xxxxxxxxx");
			config.setProxyPassword("xxxxxxxxx");
			config.setAuthEndpoint("https://login.salesforce.com/services/Soap/c/23.0");
			config.setUsername("xxxxxxxxxxxxxxxxxx");
			config.setPassword("xxxxxxxxxxxxxxxxxx");

			connection = Connector.newConnection(config);
			System.out.println("Connected to salesforce successfully.");
			System.out.println("Authorized End Point: " + config.getAuthEndpoint());
			System.out.println("Session Id : " + config.getSessionId());

			
			//Integrate Web Service
			AccountWebServiceServiceLocator service = new AccountWebServiceServiceLocator();
			try {
				service.getAccountWebService(new URL("https://login.salesforce.com/services/Soap/c/23.0"));
			} catch (ServiceException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			AccountWebServiceBindingStub stub = new AccountWebServiceBindingStub(new URL("https://login.salesforce.com/services/Soap/c/23.0"), service);
			stub.makeAccount("Testing web account");
			

            System.out.println("after call to getSoap()");			
			
		}catch(LoginFault ex){
			ex.printStackTrace();
		}catch(ConnectionException e){
			e.printStackTrace();
		}catch(AxisFault e){
			e.printStackTrace();
		}catch(RemoteException e){
			e.printStackTrace();
		}catch(MalformedURLException e){
			e.printStackTrace();
		}
		

	}

}

 I am getting the following error.

 

AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: java.net.NoRouteToHostException: No route to host: connect
 faultActor: 
 faultNode: 
 faultDetail:

 

 

Anyone have information on how to use sfdc to connect real-time into a client network to retrieve data that would be displayed to a user. 

To Whom it May Concern,

 

Can you provide me with direction on how to create a report for my client notes/attachments section of salesforce that I can then export to a CSV file?

 

Thanks for your help.

 

Sincerely,

 

Christina

We have developed a app in our developer edition account, and now we
want that to be deployed into
our Professional edition production account. We used Force.com
migration tool to retrieve the code
from the developer edition account. Now when we try to deploy to the
Professional edition
account using the following command,

<code>
ant deployCode -lib ../ant-salesforce.jar -verbose
</code>

We get a build failed message with the following traceback,

Apache Ant(TM) version 1.8.2 compiled on August 19 2011
Trying the default build file: build.xml
Buildfile: /home/azhagu/Workspaces/Force.com
IDE/salesforce_ant_23.0/sample/build.xml
Detected Java version: 1.6 in: /usr/lib/jvm/java-6-openjdk/jre
Detected OS: Linux
parsing buildfile /home/azhagu/Workspaces/Force.com
IDE/salesforce_ant_23.0/sample/build.xml with URI =
file:/home/azhagu/Workspaces/Force.com%20IDE/salesforce_ant_23.0/sample/build.xml
Project base dir set to: /home/azhagu/Workspaces/Force.com
IDE/salesforce_ant_23.0/sample
parsing buildfile
jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml
with URI = jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml
from a zip file
 [property] Loading /home/azhagu/Workspaces/Force.com
IDE/salesforce_ant_23.0/sample/build.properties
 [property] Loading Environment env.
Build sequence for target(s) `deployCode' is [deployCode]
Complete build sequence is [deployCode, listMetadata,
deployCodeFailingTest, retrieveCode, deployCodeCheckOnly,
retrieveUnpackaged, retrievePkg, bulkRetrieve, describeMetadata, test,
deployUnpackaged, undeployCode, deployZip, ]

deployCode:
parsing buildfile
jar:file:/home/azhagu/Workspaces/Force.com%20IDE/salesforce_ant_23.0/sample/../ant-salesforce.jar!/com/salesforce/antlib.xml
with URI = jar:file:/home/azhagu/Workspaces/Force.com%20IDE/salesforce_ant_23.0/sample/../ant-salesforce.jar!/com/salesforce/antlib.xml
from a zip file
[sf:deploy] Using proxy: 192.168.1.1:3128
[sf:deploy] Using proxy: 192.168.1.1:3128
[sf:deploy] Request for a deploy submitted successfully.
[sf:deploy] Request Id for the current deploy task: 04s400000003tLoAAI
[sf:deploy] Waiting for server to finish processing the request...
[sf:deploy] Request Status: InProgress
[sf:deploy] Request Status: InProgress
[sf:deploy] Request Status: Completed

BUILD FAILED
/home/azhagu/Workspaces/Force.com
IDE/salesforce_ant_23.0/sample/build.xml:46: FAILURES:
Error: classes/PramataAdminSettingsController.cls:Not available for
deploy for this organization
Error: classes/PramataProxyController.cls-meta.xml:Not available for
deploy for this organization
Error: classes/PramataControllerTests.cls:Not available for deploy for
this organization
Error: classes/PramataSettingsController.cls-meta.xml:Not available
for deploy for this organization
Error: classes/PramataAdminSettingsController.cls-meta.xml:Not
available for deploy for this organization
Error: classes/PramataProxyController.cls:Not available for deploy for
this organization
Error: classes/PramataSettingsController.cls:Not available for deploy
for this organization
Error: classes/PramataControllerTests.cls-meta.xml:Not available for
deploy for this organization
Error: components/PramataSnapshotView.component(PramataSnapshotView):Apex
class 'PramataSettingsController' does not exist
Error: pages/PramataSettings.page(PramataSettings):Apex class
'PramataAdminSettingsController' does not exist
Error: pages/PramataSnapshots.page(PramataSnapshots):Apex class
'PramataSettingsController' does not exist
Error: pages/PramataUserSettings.page(PramataUserSettings):Apex class
'PramataProxyController' does not exist

       at com.salesforce.ant.DeployTask.handleResponse(DeployTask.java:116)
       at com.salesforce.ant.SFDCMDAPIAntTaskRunner.runTask(SFDCMDAPIAntTaskRunner.java:94)
       at com.salesforce.ant.DeployTask.execute(DeployTask.java:59)
       at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:616)
       at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
       at org.apache.tools.ant.Task.perform(Task.java:348)
       at org.apache.tools.ant.Target.execute(Target.java:390)
       at org.apache.tools.ant.Target.performTasks(Target.java:411)
       at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
       at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
       at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
       at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
       at org.apache.tools.ant.Main.runBuild(Main.java:809)
       at org.apache.tools.ant.Main.startAnt(Main.java:217)
       at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
       at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 41 seconds


Please advise on where we are going wrong.

Hi,

 

I have a developer edition account with Salesforce. How can I create a test data at Salesforce.

 

Thanks

  • January 13, 2012
  • Like
  • 0

Hi!

 

I'm trying to set up a way to populate custom fields automatically with data from an API from another host.

What I'm aiming for is to get Salesforce to pull this data automatically.

 

Does anyone know how I should go about to get started with this?

 

Many thanks!

 

 

I'm looking for an API for a page ranking like Alexa, PRchecker etc.

Does anyone familiar with any exiting API?

 

Appreciate your help,

Lee

I have written this class which is select the query of the Accounts and making an csv file.

cloud u please suggest me what to do to see the working of batch apex class,

 

 

 global class ConvertAccounts implements  Database.Batchable<sObject>
    {

        global final string query;
        global ConvertAccounts (String q)
    {
       query = q;
    }

global Database.QueryLocator start(Database.BatchableContext BC)
    {

           return Database.getQueryLocator(query);
    }


global void execute(Database.BatchableContext BC, List<Account> scope)
    {
        folder f=[select id, name  from  folder  where Name='Accounts Details'];
        Document d = new Document();
        d.Name = 'Accounts CSV';
        d.folderid=f.id;
        string header = 'id , AccountNumber , name , AnnualRevenue , BillingCity , BillingCountry , Description , CreatedDate , ModifiedDate \n';
        string finalstr = header ;
     for(Account a: scope)
    {
       string recordString =   a.id+','+a.AccountNumber+','+a.Name+','+a.AnnualRevenue+','+a.BillingCity+','+a.BillingCountry+','+a.Description+','+a.CreatedDate+','+a.LastModifiedDate +'\n';
       finalstr = finalstr +recordString;
    }
    d.Body = Blob.valueOf(finalstr);
    d.ContentType = 'text/csv';
    d.Type = 'csv';
    insert d;
    update d;
 
}


global void finish(Database.BatchableContext BC)
{
  // Get the ID of the AsyncApexJob representing this batch job  
  // from Database.BatchableContext.    
  // Query the AsyncApexJob object to retrieve the current job's information.  

    AsyncApexJob a = [Select Id, Status, NumberOfErrors, JobItemsProcessed,
    TotalJobItems, CreatedBy.Email
    from AsyncApexJob where Id =:BC.getJobId()];

  // Send an email to the Apex job's submitter notifying of job completion.  
     Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
     String[] toAddresses = new String[] {'!Account.EMail'};
     mail.setToAddresses(toAddresses);
     mail.setSubject('Apex Sharing Recalculation ' + a.Status);
     mail.setPlainTextBody('The batch Apex job processed ' + a.TotalJobItems +
     'batches with '+ a.NumberOfErrors + ' failures.');

     Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
}

}

We have to make a secure callout to a HTTPS endpoint (Authorize.net) for completing payment process.  The expectation is that the request should be encrypted when sending to the Payment gateway service.  Force.com provides a class (Crypto class) to encrypt the requests.  However this requires a private key to be used for encrypting the data. 

 

  it seems that Authorize.net does not provide a private key but provides only a certificate (public key).  When using this public key for encryption, Force.com returns an error that this is not a valid private key. Does anyone know 

 

  1. If making a HTTP connection to a HTTPS endpoint, if the request is encrypted by default and that no other additional encryption is needed?
  2. How to make an encrypted call to Authorize.net payment gateway service (HTTPS endpoint)?

Hi everyone

 

I am having a website in a PHP based CMS and i wana link my website with Salefsorce via API..... i am juss worried about the API calls limit because it is a public website..... So if anyone of u hav worked on same project, then let me knw how to handle several login calls frm different or how to login juss once n evry user gets access.... 

 

 

 

Thanx in advance