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
25
votes
1answer
3k views

What is Apex built on?

Earlier today, a coworker asked what exactly Apex was. My lazy answer for those unfamiliar with Salesforce development is usually "it's like Java, but for Salesforce.com," to which he replied "is it ...
22
votes
1answer
2k views

Does Apex transpile into Java?

We know that the Apex syntax is very similar to Java. I have observed that on some occasions, while running some Apex code, you may get a Java exception. I assume that Apex runs on Java. But my ...
16
votes
3answers
9k 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 ...
13
votes
2answers
12k views

Can Data Loader run with 64-bit Java?

I have uninstalled all old versions of the data loader and installed the newest one: 36.0.0 I cleaned up all Java stuff on my 64-bit Win 7 machine and there's only one version left, it's this version ...
11
votes
1answer
5k views

REST API: How to update active values for picklist?

I need to update the Picklist values for a custom field on a custom object. I have already populated the Available Values via the Enterprise and Metadata Java APIs, but now I need to move the newly ...
10
votes
3answers
1k views

Functional programming utilities in apex

I've heard that in javascript world there is an emergent ecosystem of functional libraries (like lodash, rxjs but also es6 promise) and also in the java world (guava or Java8 with lambdas). Is there ...
9
votes
3answers
13k views

Pass a string variable from controller into the Javascript function

I have a method which returns a Yes or No String depending on it's outcome. The method is inside a standard controller extension. How do I pass the returned String into a function on the page in ...
8
votes
2answers
6k views

Create a record in an object with lookup fields through java soap

I am pretty new with Salesforce and I am doing an integration where I have to update Salesforce with data from a Business System. I have a problem when trying to create new records in an object with ...
8
votes
1answer
11k views

Using Java and Spring to integrate with Salesforce REST APIs

I want to send information from our webapp (using Java and Spring) to the Salesforce REST APIs. I'm looking for an up-to-date example of how to use Spring Security to authenticate with OAuth to the ...
8
votes
0answers
321 views

Make custom, in-memory “Lightning Data Service” work

Lightning Data Service is great. Multiple components are magically linked to database records. When records change in the db component show that change. Imagine this to work without saving change to ...
7
votes
1answer
2k views

Unable to upload an Attachment - Bulk API

I'm using Bulk API to upload attachments and getting an error: InvalidBatch : Failed to parse CSV header. Number of Records Processed: 0 While I'm getting following error at the Salesforce ...
7
votes
1answer
318 views

How do I use Salesforce connector with a Spring component?

I am using Mule standalone 3.4. I am trying to create a flow using the Salesforce connector to perform a query operation and then pass the payload to a spring component. The result is the component ...
7
votes
1answer
764 views

Updating Profile for Record Types: using Metadata API

So far I'm able to create the Record Type for an object using Java. For the object requiring only 1 Record Type using Java: (the upserts are going fine) - If I'm to create only one record Type per ...
6
votes
2answers
1k views

java.sql.SQLException error caused by OpportunityLineItem DML request

In our Salesforce.com organization, we have a trigger on the OpportunityLineItem object (insert/update), automatically generating OpportunityLineItemSchedule. The product is schedule by revenue, ...
6
votes
2answers
2k views

SOAP webservice connection getting: no access allow to this class

I'm pretty new to salesforce and SOAP but here goes. I've made a connection to my site and then passed in the config to my webservice's object. This goes fine. But then I get this error: com.sforce....
6
votes
4answers
3k views

Oauth for Java native app

I have a Java native app I am trying to implement Oauth for. I have gone thru this article by Pat Patterson: http://wiki.developerforce.com/page/Digging_Deeper_into_OAuth_2.0_on_Force.com I am a ...
6
votes
1answer
10k views

Displaying date in visualforce force page in required format

I have a date fields which on displaying on VF page displays like 12/10/2012. But i want to display it like December 10, 2012. How can i do it? i am not getting the easy way.
6
votes
1answer
2k views

Trying to get SymbolTable of an Apex class and get null

I'm quering Apex classes using Tooling API QueryResult queryResult = toolingConnection.query("select Id, ApiVersion, Name, NamespacePrefix, SymbolTable, Body from ApexClass where NamespacePrefix = ...
6
votes
1answer
2k views

How to get the content of an existing apex class using metadata api

I was able to get the names of all the apex classes in an org using metadata api with Java public void getApexClasses() throws ConnectionException { ListMetadataQuery[] queries = new ...
6
votes
2answers
8k views

Using Salesforce Partner API from community portal

I've created a custom button on the opportunity layout which calls out to an external java app. It passes the session id and the partner API URL. The external app then creates a SOAP binding (...
6
votes
1answer
228 views

Is there a zero-downtime way to rotate the server credentials used by force-wsc?

I use force-wsc to connect to the SOAP API with a username and password/security token in production. As a best practice, I rotate the password (and therefore the security token) on this server ...
6
votes
2answers
2k views

Retrieving All column names from a DataExtension

I am retrieving data from a data extension using RetrieveRequest. Following is a snippet of my approach: RetrieveRequest retrieveRequest = new RetrieveRequest(); retrieveRequest.setObjectType(...
6
votes
1answer
4k views

Multi threading in SOAP API java client

Is it possible to do the multi-threading in java application while talking to Salesforce using SOAP APIs? I tried it myself and it seemed to work fine. But according to http://boards.developerforce....
5
votes
2answers
3k views

Capture Salesforce Outbound Message with a Java SOAP Listener

I would like to send the modified data on an object to an external system. For this I am thinking to use workflow based Outbound Message option. What I understand, the required endpoint url will be ...
5
votes
3answers
23k 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 ...
5
votes
1answer
332 views

Which way to update apex class through API is preffered: MetadataContainer in Tooling API or compileClasses in Apex API?

I need to save some Apex classes through API in java and this question confused me: In documentation for the Tooling API I found an example how to update Apex class using MetadataContainer. This ...
5
votes
1answer
1k views

403:denied_by_security_policy:create_denied when subscribing to platform events

This error is thrown when I try to subscribe to a platform event using the EMP-connector. I followed the steps outlined in the documentation: https://developer.salesforce.com/docs/atlas.en-us.220.0....
4
votes
3answers
439 views

Moving Salesforce data into Heroku Java app for LDV processing?

I have read a few blog posts about moving parts of an app into a Ruby Heroku app, but no example for moving data between a Salesforce org and a custom Java app on Heroku. Do you know of any in posts ...
4
votes
1answer
2k views

Passing custom model to Apex REST custom endpoint

I have a custom APEX REST point /organization-contacts/* that accepts an array of queries to run. This is to try and find matching contacts (based on phone number in this example) in "batch". I ...
4
votes
2answers
2k views

Invalid Date format from Database

Trying to insert a Contact from an Oracle Database: Contact Database Entity: @Temporal(TemporalType.DATE) @Column(name="DOB") private Date dob; Contact SOAP SObject set Birthday: Calendar ...
4
votes
1answer
525 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 ...
4
votes
3answers
2k views

Apex Data loader - Error java.lang.UnsatisfiedLinkError: Cannot load 32-bit SW T libraries on 64-bit JVM

I am trying to run apex data loader downloaded and installed from my SalesForce account. But when I try to run the jar from command prompt with this command java -jar dataloader-29.0.0-uber.jar I ...
4
votes
2answers
3k views

Adding Bulk data to Data Extension Object in Exact target

I have a number of CSV's with each CSV having a million row sets. Now i have to send those CSV's to particular Data Extension Object in Exact target. I am aware of adding a row to data extension ...
4
votes
1answer
1k views

Can I save a new Apex class using Tooling API in java?

Is it possible to create a new Apex class using Tooling SOAP API in java? When I'm trying to do that I get ApiFault exceptionCode=’INVALID_TYPE’ exceptionMessage=’This type of object is not ...
4
votes
1answer
4k views

How to retrieve a value from a parent field with SOQL via partner API in java

I have a parent-child relationship with timesheets relating to users. I am trying to retrieve an Employment ID field from the parent record with SOQL and this is my query, where the UserID is a field ...
4
votes
1answer
498 views

Is there a way to tell if a HTML hex colour is light or dark in Apex

I have a Visualforce Colorpicker that allows users to set a background-color. I have access to this in Apex as a string, e.g. '#FF0000'. I want to know if this String is a dark color or a light ...
4
votes
1answer
1k views

how to call NodeJS from apex using Evergreen function

Salesforce has recently announced the Evergreen serverless functions. Information about the Evergreen can be found: https://developer.salesforce.com/blogs/2019/11/introducing-salesforce-evergreen....
4
votes
1answer
584 views

How to setup Tooling Api in Java Application?

I am developing a Java application that should be able to connect to any Salesforce org and use the Tooling Api. Salesforce provides a WSDL but as I understand it is org specific, correct ? Could ...
4
votes
3answers
2k views

Return custom event.message using Javascript remoting?

Short version: Can I return my own messages in the javascript remote event.message object? Long version: I use a javascript remote call to perform an ajax search. This is the code (pretty much just ...
4
votes
1answer
3k views

Call Restful SFDC service from Java

I'm still working on getting the authentication working but having issues. I have been getting a 401 unauthorized error. All of the items I have hidden I am sure are correct values UNLESSS I need to ...
4
votes
1answer
1k views

AllOrNoneHeader for Bulk API

I am trying to switch off Autocommit feature by using AllOrNoneHeader in Bulk API implementation through JAVA. I have searched over internet but see only example of implementing it for SOAP based ...
4
votes
1answer
174 views

How expensive is isDone() in java metadata api

I found the following code example online: long waitTimeMilliSecs = ONE_SECOND; // After the create() call completes, we must poll the results of the checkStatus() // call until it ...
4
votes
1answer
377 views

Salesforce Streaming API: configure Salesforce notification triggers for streaming

I'm trying to subscribe on notifications from salesforce using Streaming API. So I've done: I've created streaming channel I used java client I've generated events via REST API All this steps ...
4
votes
2answers
457 views

How to use Name Object

I am using the Java API and trying to create an Attachment with a reference to the Parent external Id field. The setParent() method takes a Name object as the parameter. For what I read, the Name ...
4
votes
1answer
563 views

Error when trying to create an User-Initiated object (ETEmailSendDefinition)

I'm trying to use fuelsdk-0.999.jar and fuelsdk-0.9999.jar (both gave me the same error) in a Java projetc downloaded from https://github.com/ExactTarget/FuelSDK-Java/releases and when I try to call ...
4
votes
1answer
719 views

Data Loader on MacOS - java.lang.NullPointerException with Zulu/OpenJDK 11

Last login: Thu Aug 27 14:29:01 on ttys000 /Users/vamshikrishna/dataloader/v49.0.0/dataloader.command ; exit; vamshikrishna@MacBook-Pro-6 ~ % /Users/vamshikrishna/dataloader/v49.0.0/dataloader.command ...
4
votes
0answers
119 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 ...
4
votes
0answers
453 views

Data Loader does not open on OS X El Captain

Does anyone have similar issue opening Data Laoder on MAC OS X El Capitan?
4
votes
0answers
473 views

Override PartnerAPI ClassLoader

We have exported as Runnable JAR (Extract required libriries into generated JAR option) our proyect (which has dependecies the fuelsdk and axis). So, there are some classes which read properties ...
3
votes
2answers
632 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