Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

-2
votes
1answer
50 views

How to omit/remove xml declaration using DOM

I have code which appends XML header to the existing xmlstring. In that I am getting response with XML declaration <?xml version="1.0" encoding="UTF-8"?> and I have add the attribute in my Tag ...
0
votes
0answers
17 views

Java Fuel SDK - Cannot create a TriggeredSendDefinition

I'm facing a issue while trying to create a TriggeredSendDefinition via FuelSDK for Java. I managed to create an ETSoapConnection object, to define the TriggeredSendDefinition and to create a ...
2
votes
0answers
17 views

How to retrieve objects that inherit from APIObject using FuelSDK-Java [closed]

I'm trying to retrieve all sends from an account on salesforce and even though I can instantiate the client using: ETConfiguration configuration = new ETConfiguration(); configuration.set("clientId"...
0
votes
1answer
36 views

Integration that involves encryption

I've done quite a few JSON/REST integrations and only two SOAPs, but this API I'm working with looks like neither. They do offer example code. I stuck with the java example because that is what I've ...
1
vote
0answers
14 views

Type Cast Version 14.0 SObject to Version 45.0 SObject in Java

I am performing maintenance on an old Java application that uses version 14.0 Java Stubs to perform SOAP operations. Need to integrate ETM 2.0 objects into this application, is there anyway to type ...
1
vote
1answer
102 views

Is Crypto.generateMac method work exactly the same as Mac and SecretKeySpec java classes

I need to create a signature in order to send a request to CyberSource. I have the following Java code, that works perfectly: String signatureString = "Test"; final Mac sha256HMAC = Mac.getInstance("...
1
vote
0answers
34 views

Error while using JAVA FuelSDK

I am using eclipse java luna to install Java fuelSDK. I used maven to add the following dependency to my project's pom.xml: com.github.salesforce-marketingcloud fuelsdk 1.3.2 Content of my ...
0
votes
0answers
15 views

Formula field in a Predefined Field Value (Email)

I have a record, namely Quote, which has a lookup relationship with Contact. Now, I'm creating an Email tab under the Activity, and I want the fields (To, From, Subject, etc..) to be auto-populated. ...
0
votes
1answer
27 views

Using to SOAP API in SpringBoot application to get the DE data

I'm new to SF Marketing Cloud and need to use Soap API in SpringBoot application to get DataExtensions data to do some manipulations. I'm not sure where to get MC DataExtensions API/end Point as well ...
0
votes
0answers
32 views

Content Builder and FuelSDK-Java

We have a project on Grails that we use to create emails and other assets on Classic Content using the FuelsSDK for Java. Now we are trying to integrate the creation of assets on content builder, ...
0
votes
0answers
26 views

Accessing salesforce data using JAVA program - facing an issue

This is my JAVA code: package SFtest; import java.io.IOException; import java.net.*; import org.apache.http.client.methods.HttpPost; import org.apache.http.client....
0
votes
0answers
25 views

Heroku And Salesforce Connectivity

I have created Connectivity with Salesforce using "Heroku Connect". While i create record in salesforce it is creating record in heroku postgres database but while i inserted record in to heroku ...
1
vote
1answer
43 views

Do we have an option to create UnManaged package using any Salesforce API call?

I want to create an unmanaged package using API call, is it possible? Is yes, please suggest the approach. Our expectation is to create a unmanaged package in a salesforce org and add the metadata ...
1
vote
1answer
16 views

bulk request size [closed]

i have created a restful web service using java which will accept the json records.I would like to know what is the maximum size of the json request so that api can handle? and what is the best way to ...
2
votes
1answer
108 views

INVALID_SESSION_ID when calling Salesforce services from Java

We have a Java application running on glassfish that makes callouts to WebServices hosted on our SF sandbox using the Partner WSDL and the SF Web Service Connector (wsc). Yesterday it was working ...
1
vote
1answer
65 views

How to update the FLS using Salesforce Metadata API in a bulk update?

I have a set of fields in the array list which I wanted to give FLS with Read access. I'm using below piece of code to update the field level security using Salesforce API in java language. But the ...
1
vote
2answers
43 views

Requirements for Custom Journey Builder Activitity development

I'm tasked with planning the development of a custom journey builder activity and have some questions: Can Java be used as the back-end for the developed webservice that will live in Journey Buider? ...
0
votes
1answer
31 views

Java Json formating not wokring ok

I have a program which read a csv file (1.2 mil) records, and then using batches , sent a json request to marketing cloud to create records. The right format(working ) format of json is [{ "...
0
votes
2answers
32 views

Set class method ContainsAll not working for special character '-' in strings?

Facing a weird issue I have spaces and hyphen in my set of strings and now doing at ContainsAll check but it always returns false. If I remove hyphen - between my strings data then it works? Can ...
4
votes
1answer
123 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 ...
0
votes
1answer
168 views

java program with Unirest is giving error

I have a client id and client sercet , i want to invoke marketing cloud rest api to get access token package TestingMC; import org.apache.http.HttpResponse; import com.mashape.unirest.http.*; ...
0
votes
1answer
35 views

Edit Update Reminder Setup by API

Is this possible to edit values of Checkboxes: Update Reminder Setup: - Enable Update Reminders for My Organization - Automatically Activate Reminders for Users with Direct Reports by some API, ...
0
votes
2answers
15 views

How do I use the Java API to update only a single attribute on a record?

I'm using Java 8 and v 33.0 of the SalesForce API. We are trying to update a single field on a record. Basically we are trying to do it like this final CventSession__c ...
0
votes
1answer
22 views

how to to call salesforce metadata API to get info about particular object of salesfocce in Java [closed]

how to call salesforce Apex class from Java code. I am trying to call salesforce metadata API to get info about particular object of salesfocce in Java.
1
vote
1answer
350 views

HTTP Post with redirect(302 Response Code auto ridirect to external URL)

I am accessing an Exteranl API, This Api returns the response code as "302" with HTML Response, This what iam expecting to achive, When i got the response as HTML it should redirect to the Response ...
0
votes
1answer
593 views

null argument for JSONGenerator.writeStringField()

Im getting the error 'null argument for JSONGenerator.writeStringField()' when I call the below class from Visual Page. Visualforce Page Code: <apex:page standardController="Lead" extensions="...
1
vote
1answer
204 views

HTTP Callout from salesforce to private server URL(VPN connected)

Can we hit a private server URL with HTTP request from Salesforce ?? or the server should always be public. I have make the Post callout which was written in Rails (hosted on Private server- VPN ...
0
votes
1answer
44 views

Salesforce SOAP API doesnt have setRecordTypeId method when using enterprise WSDL

I am using SOAP API to post leads in salesforce i want leads to be of specific record type but im not getting any option to set the record type of lead.Please Find code below. ...
0
votes
1answer
273 views

can i pass variable values from ampscript to javascript?

i have a cloud page in marketing cloud. In cloud page, I am using ampscript and javascript both. Can i pass variables values from my ampscript to javascript directly? I have already tried this ...
0
votes
0answers
38 views

Can we upload Multiple files in to SFDC Attachment object using force-wsc jar?

I am using REST Api to upload files in to Salesforce Attachment object but can not upload multiple files in single call (no Batch). Just curious to know whether we can achieve this using force-wsc ...
0
votes
1answer
79 views

Getting “Nesting of semi join sub-selects is not supported” when submitting query

I'm using Java to query SF, using the aPI version 33.0. I'm trying to submit the following query SELECT Id, EODBID__c from Account where Id in (Select AccountId from Opportunity where RecordTypeId ...
0
votes
1answer
92 views

How to get LastModifiedDate of Custom Field or Custom Label by Metadata API in Java?

How to get LastModifiedDate of Custom Field or Custom Label by Metadata API in Java? Edit: I found a link: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/customfield.htm?...
0
votes
0answers
27 views

Fetch Metadata from Salesforce using Tooling API objects [duplicate]

I am building a tool in Java to fetch all the metadata from Salesforce using the Tooling API. For Ex: I want to fetch all the profiles details including object-permission, field-premission, ...
0
votes
1answer
30 views

SOAP API v42: Edit “Default Organization Level Values” of Custom Settings

How to edit Default Organization Level Values of Custom Settings in Soap API in Java? I mean, how to edit... Setup > Build > Develop > Custom Settings > [Any CS Object] > Manage > ...
0
votes
1answer
109 views

How to get LIST of Custom Settings by API with Query Condition?

I want to get list of available Custom Settings using SF API in Java. I mean Setup > Build > Develop > Custom Settings > Get that list Additionally, I need to have got the condition in ...
1
vote
1answer
90 views

How can I create a queue group via the API

So in testing, I've figured out that a queue is a type of Group. I'm trying to POST a new group, then change its Type from "regular" to "queue", but in doing so, I get this error message: Unable to ...
0
votes
1answer
42 views

How to get opportunity history value and convert it to pdf?

im new in salesforce programming.. I made an pdf report (button) on opportunity.. I can get the opportunity object field value (and opportunityLineItem) and convert it to pdf.. but down below the ...
0
votes
1answer
53 views

Why deploy.zip file does not deploy metadata when archived using java.utils.zip?

I have created deploy folder with all correct metadata definitions. If I compress the folder using java program and try to deploy it using DeploySample java code, get success in console but no ...
0
votes
0answers
104 views

How to set proxy in Fuel-SDK java api?

I wanted some help with the fuel sdk java api. I am unable to connect to SFMC from my office network. I have tried setting proxy in java code but nothing has helped. Has any one solved this issue ...
0
votes
1answer
215 views

Automating CSV Uploads into Einstein Analytics with Wave DatasetUtils

According to this Trailblazer Community Post, the Wave DatasetUtils tool can be used to automate csv uploads into Einstein Analytics (the user lists this option alongside automating via Apex). ...
1
vote
1answer
57 views

Can I use enterprise.jar/metadata.jar generated from one org to establish connection with different org?

I have generated jar from enterprise.wsdl for some java development. I wonder if i could use the same jar to establish connection to different salesforce org having different enterprise.wsdl file? ...
1
vote
1answer
58 views

Do we have `setQueryOptions` for tooling API?

The Symbol table is only queried through tooling API. Do we have an option to set setQueryOptions when doing that, or similar way of setting batch size to do that. Because when running query() and ...
1
vote
1answer
57 views

Identity URL always throwing Missing_OAuth_Token?

HttpClient httpClient = new HttpClient(); PostMethod post = new PostMethod(environment); post.addParameter("code", code); post.addParameter("grant_type", "authorization_code"); post....
1
vote
1answer
218 views

Tooling API : how to query on Salesforce Standard classes?

How can I query and get Standard Apex classes and their Symbol table via tooling API or Partner API? For eg: getting a custom Apex Class : String apexClassBodytooling = "SELECT Id, Name, SymbolTable ...
1
vote
1answer
22 views

How do you determine how many results are in the current query batch?

We're using Java 8, v 33.0 of the SF API and trying to build an endpoint in Java to iterate over results. I have this import com.sforce.soap.enterprise.QueryResult; ... QueryResult ...
1
vote
2answers
111 views

ToolingConnection's query method throwing com.sforce.ws.ConnectionException: Failed to load class: com.sforce.soap.tooling.InvalidSObjectFault

I'm using Salesforce Tooling API in Java code and I am able to use create method of ToolingConnection. Bellow code is creating an apex class successfully. I'm getting exception when using query method ...
0
votes
0answers
367 views

calling salesforce rest api from java to create leads

I am writting below code to create leads in salesforce crm through its rest full api.But it is giving error 401.Can any one help me to sort out this issue. static String generateHeader() { ...
0
votes
1answer
231 views

JSONGenerator issue

I want to return a JSON from my Apex Rest web service. There is a list of objects I must return. If I just make the return type of the method as return myCustObjList Edit here goes the datatype: ...
0
votes
1answer
58 views

W/I Test.SalesForce.com Sandbox, SOAP endpoint call using Java EnterpriseConnection.describeGlobal() NOT returning RemedyForce “BMCServiceDesk__x”

Within Test.SalesForce.com Sandbox, SOAP endpoint call using Java EnterpriseConnection.describeGlobal() NOT returning any RemedyForce / "BMCServiceDesk__xxxx" objects Background Information 1) I am ...
0
votes
1answer
150 views

Updating FLS using metadata API through java

I wanted to update FLS for the custom fields in Profile level. @datasert- Thanks for guided me on the right path, I have tried with the code below but after executed the code, changes are not ...