Questions tagged [java]

Java is a computer programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few implementation dependencies as possible.

Filter by
Sorted by
Tagged with
0
votes
1answer
55 views

Encryption decryption Throws Error some time and some time works

Encription Decription Throws Error Some time. Comman pattern that fails is Encripted Text text to decript is when i am passing in encripted text into URL and if URL contains % or + it throws Error. ...
1
vote
1answer
609 views

EMP-Connector not logging in

There's a sample called EMP-Connector which is used to show the streaming API working. I pulled it from github (forcedotcom/EMP-Connector) and compile it. But it fails to get past the login for me. It ...
1
vote
0answers
266 views

autoclose popup window on a custom button after clicking “Save” [closed]

I have implemented a custom Javascript button called "Send Email" under Activity history. When a user clicks this button a new popup window should open that enables the user to send an e-mail. The JS ...
1
vote
0answers
86 views

convert ANT script to Java

I have been digging for almost a week into the forums and S/F Developer pages for good "basic" Java code to retrieve a package from one ORG and Deploy to another ORG. I have had success building the ...
0
votes
2answers
1k views

Bulk Query with PK Chunking enabled sometimes does not return all the batches

The requirement is to use Bulk Query API with PK Chunking enabled, and to create CVS files for each batch with the chunk-size For example, in the Account Object if I have 80,000 records, and have the "...
0
votes
1answer
2k views

org.xml.sax.SAXException: Invalid element in com.sforce.soap.partner.fault.UnexpectedErrorFault - upgradeURL

I am using salesforce SOAP API version 8. This is Login code which i am using for login for Salesforce Soap API. public String login(String userid, String passwd) { SoapBindingStub binding; ...
0
votes
0answers
3k views

Salesforce REST API using Java

I am trying to make Connect Salesforce with Java using Rest Api. But I am getting authentication Error and status = 400 I followed the all the steps mentioned here : http://resources.docs.salesforce....
0
votes
1answer
87 views

Specify record type for Opportunity Custom button- Mass edit

I'm not familiar with Javascript at all, but trying to create a button which allows users to mass-edit some key fields of their opportunities. I have the below by copying the code of the preset button ...
1
vote
2answers
32 views

Unexpected Java Error in Visualforce component with Apex Class as attribute

All, I've created a Visualforce component which takes an instance of an Apex wrapper class as an attribute. However, when I attempt to insert the component into a VF page, I get the following error ...
0
votes
1answer
825 views

HTTP 400 Bad Request trying to create a bulk API job using RestTemplate

Am trying to use spring RestTemplate to create a bulk API job. Below is the code HttpHeaders headers= new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_JSON); headers.add("sforce-enable-...
0
votes
1answer
607 views

convert java crypto code to apex

i need to convert the java code to apex code. i tried my best using Crypto class but the result are totally different from the one i get using java code. Below are the two java classes which i need to ...
0
votes
2answers
71 views

How to convert “2016-11-08T13:04:16.5260175Z” this into apex datetime like “11/8/2016 1:04 PM”

I need to convert "2016-11-08T13:04:16.5260175Z" this one into DateTime format like "11/8/2016 1:04 PM". Please help me.
0
votes
1answer
338 views

How do I get my test SalesForce instance to work with our Java hosting environment?

We are trying to get our J2EE hosting environment (Jboss 7.1.3.AS) working with our test SalesForce instance. We are running Java 6 v 111 java version "1.6.0_111" Java(TM) SE Runtime Environment (...
2
votes
1answer
78 views

SOQL retrieve limited?

I'm doing an integration using Partner WSDL. When I try to retrieve more than 15 Leads, it's return NullPointerException and I have 43 Leads. When I try to retieve all my Contacts, it's just return ...
0
votes
1answer
158 views

Fuel SDK java: NullPointerException in login

I am using fuel-java-1.0.1. Using the following code for login: ETConfiguration configuration = new ETConfiguration(); configuration.set("clientId", "my-client-id"); configuration.set("clientSecret", ...
2
votes
1answer
219 views

Salesforce streaming API issue in version 37

I am using the salesforce java streaming API code that is provided in the salesforce documentation. Code is working fine. But when I use the CometDReplyExtension for getting the events based on ...
3
votes
1answer
566 views

Multipart Post to Attachment

I am trying to send a binary file in Java to Salesforce '/sobject/Attachment' endpoint. Below is the code I am trying to use, but I keep receiving a 400 error. Any idea as to what the solution is? ...
3
votes
2answers
921 views

Streaming API: Replay Events/ Durable PushTopic from java client

Useful new feature, GA Summer'16. I like it. While I can successfully consume streaming api via java client, no problems, I am unable to take advantage of this new replay option with my java client. ...
0
votes
1answer
486 views

Trigger Emails - Not able to modify the FromAddress using TriggeredSendDefinition

I am trying to trigger send an email using TriggeredSendDefinition. Every time I am receiving an email from the DEFAULT account (Business unit email id). I tried to give from address in ...
0
votes
1answer
439 views

Rest API automation testing

I'm currently working on an automation project with Salesforce and I need to fetch data from the backend. What I need is some guidance on how to create an RestAPI end point so from my java project I ...
1
vote
1answer
188 views

Create Contacts by Java SOAP API

I'm trying to create one or more contacts by Java SOAP Enterprise API but I'm getting error. This is the code: for (int i=0;i<5;i++) { Contact c = new Contact(); c.setFirstName("aaaa"...
2
votes
1answer
362 views

Build partner.jar

I'm following the instruction on Trailhead. When I tried with the enterprise.wsdl I was able to generate the enterprise.jar using force-wsc-37.0.jar, js-1.7R2.jar and ST-4.0.8.jar. Now I'm ...
3
votes
2answers
447 views

How to communicate with Salesforce without WSDL?

We have a platform which is programmed in Java. The problem is, every time the WSDL changes(happens more often), the platform crashes. Is there a way to communicate to Salesforce without the WSDL? Or ...
1
vote
0answers
532 views

Exception occurred in the TriggeredSendSubscriberHandler

I am making request to send a triggered email and the request fails. I am getting the following response: ID: 13543 Response-Code: 200 Encoding: UTF-8 Content-Type: text/xml; charset=utf-8 Headers: {...
0
votes
1answer
128 views

How to provide custom parameters for triggered email

I'm going to use SOAP API via Java and plan to send triggered emails. How to provide custom parameters during email send invocation? Example to explain my usecase: I generate some secret key in my ...
1
vote
1answer
505 views

Is it possible to send email using Fuel SDK for Java?

I'm facing the problem with Fuel SDK integration with Java - I can't understand how to send the newly created email. In this article I see how to perform similar operation using Php: $response = new ...
0
votes
1answer
1k views

How to return fields to webservice response?

When the user enters his name from third party application, The user needs to get all the records(Account(name,Phone,email),Contact(firstname,Lastname),Lead(email,mobile number)) matching the text ...
1
vote
1answer
327 views

Java - Metadata Api readMetadata() not returning corrrect info

I am trying calling readMetadata() method in java to return all instances of a metadata type in my sandbox: For example calling readMetadata("ApexClass") will return the api names of all apex classes ...
4
votes
1answer
493 views

Getting salesforce instance URL from Java

Is there a way for me to get salesforce instance URL from Java? I was looking for something similar to System.Url.getSalesforceBaseUrl() in Apex, but I couldn't find anything suitable in Metadata or ...
0
votes
1answer
228 views

Heroku Integration with Salesforce

Can Someone explain the main purpose of Heroku and Limitations of using it? I have a core java project which as a end result provides an registration key of size 16 char. I want to get this ...
0
votes
0answers
73 views

Is the Java SOAP API deprecated?

It seems that all of the documentation on the Salesforce website for a SOAP call is from 4+ years ago, and all of the example code contains old, and deprecated methods from the wsc library. Is there a ...
4
votes
0answers
111 views

Accessing SAML Login Information in Connected App programmatically

I was looking for a way to programmatically read (and potentially - write) data in SAML Login Information (on ConnectedApp 'manage-side' settings), as displayed below: I already tried using Metadata ...
2
votes
1answer
988 views

“Cannot parse empty string” error when exporting using dataloader

I'm trying to run Data Loader from the command line and export all the fields for the contact object. We're using a third party app which has modified this standard object. I've defined a mapping file ...
5
votes
3answers
21k views

How to set TLS Version in Java SOAP API

I am trying to connect to a new org using the Java SOAP API and am getting the following error: [UnexpectedErrorFault [ApiFault exceptionCode='UNSUPPORTED_CLIENT' exceptionMessage='TLS 1.0 has been ...
1
vote
1answer
5k views

How to enable TLS 1.1 or Tls1.2 in Java 7

I am using salesforce soap API i has activated tls 1.1 in SF-->Critical updates i am getting this error UNSUPPORTED_CLIENT: TLS 1.0 has been disabled in this organization. Please use TLS 1.1 or ...
0
votes
1answer
544 views

Java Fuel SDK ETClient class causing NullPointerException

I know this is caused by a null value, however I'm not sure why it's null. Have I not instantiated ETClient correctly? Or overlooked something else? package exacttarget.api; import com.exacttarget....
3
votes
2answers
1k views

Can you use COUNT() in a SOQL query from SOAP API?

I want to use the Java SOAP API to execute a query like the following: connection.query("SELECT COUNT(Id) FROM Contact WHERE . . ."); However I get back a single SObject: [SObject fieldsToNull='{[...
0
votes
1answer
28 views

Does my org CS version limit which Streaming and REST APIs I can use?

If I'm using Salesforce "Spring 16" (CS10), does that org impose limitations to which Streaming API version I may use? (currently, our Java apps use v33 push topics) Is there any benefit to using more ...
0
votes
1answer
3k views

Error could not find or load main class com.sforce.ws.tools.wsdlc

I want to compile the partner API code from the WSDL using the WSC compile tool. After running java -classpath wsc-22.jar com.sforce.ws.tools.wsdlc partner.wsdl partner.jar I get the error: ...
1
vote
1answer
1k views

Instance of Inner Class

How to update argument of inner class instance ? This is the explanation : public class { constructor { Initialize Inner class Instance(arg1) } method { variable arg2; ...
0
votes
1answer
160 views

Not able to get access token from salesforce

I am getting authorization code and when i am trying to get the access token than it give error like { "error": "unsupported_grant_type" "error_description": "grant type not supported" } This is my ...
1
vote
2answers
1k views

How to disabe API user session timeout?

I have currently developed a Java API client that connect against the Salesforce instance of my company. Using the following tutorial: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/...
2
votes
1answer
131 views

Security on Connecting to Salesforce from a Java app

I was trying to connect to Salesforce and migrate data from mySQL database to Salesforce using Java. During the connection process I found that we have to give the Username, Password and oAuth token ...
0
votes
1answer
387 views

OAuth worked initially, but failed with 401 on the next day & subsequent

I'm working from https://developer.salesforce.com/page/Integrating_Java_Spring_Apps_on_Heroku_with_Force.com_REST_APIs On the first day, I got everything to work with localhost, so if I opened http://...
0
votes
1answer
729 views

How to export data using reports from SFDC programmatically?

We have an issue where we have to manually click Export Report on SFDC reports though the UI on many reports. These reports have several filters and filter logic such as "(1 or 2) AND (4 AND 1)" and ...
1
vote
0answers
225 views

Not able to insert record into a custom object

I am having some difficulty inserting a row into a custom object. I am writing a java application that will insert rows into a custom salesforce object. There is no exception that is thrown, so I don'...
0
votes
1answer
112 views

Java - like Apex for SOBJECTS

Sorry, I don't know if this is a proper context to make this question, but I don't know where to make this question. I write here because I immagine that a lot for today apex programmers has been ...
16
votes
3answers
7k views

Salesforce Metadata Api/ Tooling Api to build changesets

I was wondering if it was possible to use any of the API's provided by SF to build an external (C#, Java) application to manage building changesets. Building changesets is very tedious when trying ...
0
votes
1answer
313 views

Java Fuel-SDK searching Data Extension for Email

We are using the Java Fuel-SDK 1.0.3 to select a row with a specific email address from a Data Extension. The existing documentation either says ‘Coming soon!’ or points to the Javadoc. While the ...
3
votes
2answers
590 views

Need some help with jquery plugin select2 and VF page

I am trying to use jquery plugin select2 in my VF page to make the select look better. For some reason i cant get it to work. I have loaded in all the js and css as static resources. There is no ...

1 2 3
4
5
8