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
1
vote
1answer
791 views

Issue inserting Recordtype for object

I am writing a JAVA-application that mainly functions as a CRUD-platform for my employees. On this application, users can manage data from a specific objects. I am using REST-API. Now, here is my ...
1
vote
1answer
496 views

[FuelSDK Java 1.2.1][ java.lang.IllegalStateException: Already connected] When using constructor of ETClient

This is my example code. It can run in local machine, but when deploy to EC2 instance of Amazon AWS, error was occured. public class SalesforceMarketingCloudDBService { private static final Logger ...
0
votes
0answers
20 views

Seeking Normalize class equivalent in Apex [duplicate]

The below is feasible in Java. Is there a way to do the same in Apex? String subjectString = "öäü"; subjectString = Normalizer.normalize(subjectString, Normalizer.Form.NFD); String ...
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....
0
votes
1answer
546 views

Can't add users to permission set programatically due to TABSET_LIMIT_EXCEEDED

When attempting to add all users to a permission set programmatically using the Java SOAP API, I am running into an issue where all of the users are not being added to the permission set. The error ...
2
votes
1answer
536 views

Setting a cookie in a canvas app?

I have a Java application that sets a cookie: Cookie keks = new Cookie("Demo","WeLoveCookies"); keks.setHttpOnly(true); keks.setSecure(true); keks.setPath("/"); response.addCookie(...
3
votes
1answer
4k views

Is there anyway to check if an access token is valid or not?

I got an access token from Salesforce and now I want to check if it's valid or not. How can I do this? Updated question. I have a client application and a server. The client requests an access token ...
0
votes
1answer
34 views

Can I upload Java class as a Jar file in Static Resource and use that Java class components in Apex class?

I have piece of code in Java language, I need to use it in apex class. Let me know if I can upload Java class as Static Resource and use it in Apex class?
1
vote
2answers
1k views

Developing ExactTarget app in JAVA SDK: Part 2

The example for updating Data Extensions in "Developing ExactTarget app in JAVA SDK" was what I have been looking for. Unfortunately, I'm not able to get it work for Shared Data Extensions. I've ...
0
votes
1answer
1k 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). ...
0
votes
1answer
900 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 ...
0
votes
1answer
245 views

Salesforce SSL Cert imported into java trust store for integration works on the day imported but gives certificate error the next day

I am importing the Salesforce SSL certs for the test.salesforce.com and our sandbox environment using the commands below in a VM server environment. Import test.salesforce.com or login.salesforce.com ...
0
votes
1answer
538 views

Display a Pardot Custom Field on Thank You (Code) page of Form

I have a Pardot form where the person enters an Account# (field is populated already in Pardot). They hit submit, and I'd like the Thank You text in Pardot to display another field of their's based on ...
0
votes
1answer
596 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....
4
votes
1answer
707 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 ...
0
votes
2answers
2k 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
0answers
16 views

Set up Salesforce push notification for Android using SDK

I would like to integrate push notification on Android application using Salesforce. I have integretaed Salesforce SDK on the Android applicaiton. Calling PushMessaging.register function i have ...
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....
1
vote
2answers
784 views

Data Loader Won't Open

I have followed the instructions given for downloading Data Loader to a T. Every time I tried to open Data Loader after installation, it would just say I don't have zulu installed and then just close.....
0
votes
1answer
26 views

How to read apex classes from outside java application?

Need assistance with how can I read apex class lines? which API should I use for accomplishing this REST or SOAP? Please help.
1
vote
1answer
1k views

Destination URL not reset. The URL returned from login must be set in the SforceService

I am still a little new to web services and could use some help. Currently I am going through some code that was implemented before I started at this company. The code is trying to connect to ...
0
votes
1answer
3k 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
1answer
833 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 ...
2
votes
1answer
199 views

Heroku installs wrong JDK version

I added system.properties file with the content java.runtime.version=11 to my application like described here, committed the changes and pushed afterwards with git push heroku master unfortunately, ...
0
votes
0answers
22 views

Failed to add UserPermissions - Create/Update Account User

I'm trying to add user's permissions to determinate user. Using the code below, I'm using Apache CXF and generate the service from Marketing Cloud SOAP API AccountUser accountUser = new ...
1
vote
0answers
49 views

Convert decoding from JAVA to apex

I have a method that was implemented on JAVA, but I need it in Apex public static String decryptAccountInformation(String websitekey, String document,String encryptedAccount) { String key = ...
3
votes
0answers
1k views

Invalid Query Locator in REST API

When making a REST API query call from a Java client I'm getting an INVALID_QUERY_LOCATOR error. I'm familiar with the limitation around 10 query locators in the same time and in my code I'm avoiding ...
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 ...
1
vote
1answer
95 views

Check if a substring is repeating in a string

My requirement is to find if a unknown string of 4 chars is repeating of a string of length 16. So basically, INPUT : "shgtHellorhecHello" Should return true. Only known thing to us is that the ...
0
votes
0answers
49 views

Static resource is not uploading files

We have multiple post-deployment steps and Data uploading is one of the post-deployment steps. We have created an automation script to upload the data file from the static resources. We have Company ...
0
votes
1answer
35 views

What's the best way to pull all the Metadata types from the Salesforce?

I have used describeMetadata() call to fetch the xml names but it's showing only few out of what we have in the Metadata coverage url. I was wondering if there is a way to pull all the Metadata types ...
0
votes
1answer
28 views

Mismatch in custom object field count in rest api and salesforce UI

I have a java codebase for performing CRUD on salesforce as an rdbms db. I was looking at the response on my rest api and that on SF setup UI of a custom object that I create in object manager. I have ...
2
votes
0answers
326 views

Porting Java to Apex: libphonenumber [closed]

To perform back-end validation and formatting of phone numbers, I am interested in porting the Java version of Google's open-source libphonenumber library to Apex. If you have ported a Java library to ...
0
votes
1answer
216 views

Usage of salesforce bulk api for integration with java using rest

I am new to salesforce, hence this long post. I wanted to create a java app to do CRUD on salesforce. I have followed the rest api tutorial, and created app for fetching data from salesforce using ...
0
votes
0answers
37 views

I want to change color of tablesorter vector icon in header. Its grey I want to change it to white

I am using the following css and js --- $(document).ready(function(){ $("table").tablesorter({ theme : 'jui', headerTemplate : '{content} {icon}', ...
0
votes
0answers
191 views

Authentication error with JWT token - Server returned HTTP response code: 400

I am trying to authenticate to Salesforce with JWT Bearer flow but getting error- java.io.IOException: Server returned HTTP response code: 400 for URL: https://login.salesforce.com/services/oauth2/...
0
votes
1answer
19 views

not able to get FaultString in soap api JAVA

I am trying to get faultstring from SoapFaultException class but can only get faultcode but not faultstring. Code snipped : public static Object querySf(String query , PartnerConnection pc) throws ...
0
votes
1answer
38 views

How to create a records as another user with Salesforce OAuth AccessToken

Am able to create the records as an admin using the OAuth access_token. But, here I need to create a record as another user with the OAuth access_token. Could you please share the sample code. Thanks ...
0
votes
2answers
106 views

How to retrieve status of an Automation using Java FuelSDK

I'm using Java 8 with FuelSDK and am trying to retrieve some Automations but can however not wrap my head around how do it. I am able to fetch the DataExtensions using the following code: ...
0
votes
2answers
40 views

Optimization of code removing extra if and else block

I need to remove the extra if and else loop as per the req and need to make it short for reading of the code should be easy. can anyone suggest some better for below: if (data[0].FA_N__c) { ...
0
votes
1answer
44 views

Lightning Web Component findIndex [duplicate]

Hi I need help with the method that follows: var ages = [3, 10, 18, 20]; function checkAdult(age) { return age >= 18; } function myFunction() { document.getElementById("demo").innerHTML = ...
0
votes
1answer
52 views

Javascript ternary operator

I need to set a constant value as true or false for the particular scenario not sure correct working or not const test = data.findIndex(d => d.Fname === '' && d.Lname === '') < 0 ? false ...
0
votes
0answers
67 views

How to use ETDataExtension / ETResponse / ETConfiguration by Salesforce Marketing Cloud Java SDK

I need to download more than 2500 Rows from tables of Salesforce Marketing Cloud with following code(for ETSubscriber): ETConfiguration configuration = new ETConfiguration(); configuration....
1
vote
2answers
6k views

ErrorCode 180008 - Unable to queue Triggered Send request. There are no valid subscribers

I'm trying to send an email by ET rest api in Java. I already successfully sent a SMS and got a token in response, but an error is triggered with emails. Here is the JSON I send : { "To": {"...
0
votes
1answer
48 views

Salesforce Marketing Cloud download API Biggest Table

I'm trying download, for Soap calls, tables of Salesforce Marketing Cloud with 1 million or more rows but the process is very slowly. For each download I can only get 2.500 records, ok. I have used ...
1
vote
0answers
19 views

Serialize Workflow object to XML

I'm developing a test application that modifies the workflow by reading the retrieved Workflow files that are downloaded. The files are read, the workflow switch is modified and submitted to Metadata ...
0
votes
2answers
47 views

Comparing two date fields and writing an Utility Class - Apex, Salesforce

I have two date fields Manager_recruitment_date__c Recruitment_officer_date__c I would want to write a utility class where I want to compare both these fields, and take the Max date and use it ...
0
votes
1answer
147 views

Why I don't receive proper results by running query in Apache Camel?

MyRouteBuilder.java rom("direct:select") .log("============Query to salesforce===========") .to("salesforce:query?sObjectQuery=select Id,Name,PSA_Activity_Sequence__c,...
0
votes
1answer
48 views

Unable to Compare two Strings in Salesforce - APEX

I am trying to Compare two strings which are delimited by SEMI-COLUMN (;). I have made sure I SPLIT them and the store them in lists. In the below example, I receive an error for BALL for all other ...
1
vote
2answers
228 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
2 3 4 5
8