-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
6Questions
-
7Replies
java.util.GregorianCalendar Flow error
I am using Flow to run an API call to an external system that in turn return a record structure, One of the records fields is a datetime field type. When I try to access the record datetime field in a screen element (or any other element) I am getting the below error
class java.util.GregorianCalendar cannot be cast to class moduleapi.interaction.DateTime (java.util.GregorianCalendar is in module java.base of loader 'bootstrap'; moduleapi.interaction.DateTime is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @4ee37ca3)
below is the Apex Action I use. The Action save its output into an account record variable and then after if I try to access the datetime__c field I get the class java.util.GregorianCalendar error I reported above.Why? if I use date instead of datetime it works. If I initiate the datetime__c like this it works out.acc = [select name, datetime__c from Account where id ='0014J000004uVIUQA2'];
driving me nuts.
global class datetime_issue {
@InvocableMethod(label = 'datetime_issue')
global static list<outputCls> getAccounts() {
outputCls out = new outputCls();
out.acc = new account();
out.acc.datetime__c = system.now();
out.acc.name = 'datetime issue';
return new list<outputCls>{out};
}
global class outputCls {
@InvocableVariable
public account acc;
}
}
class java.util.GregorianCalendar cannot be cast to class moduleapi.interaction.DateTime (java.util.GregorianCalendar is in module java.base of loader 'bootstrap'; moduleapi.interaction.DateTime is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @4ee37ca3)
below is the Apex Action I use. The Action save its output into an account record variable and then after if I try to access the datetime__c field I get the class java.util.GregorianCalendar error I reported above.Why? if I use date instead of datetime it works. If I initiate the datetime__c like this it works out.acc = [select name, datetime__c from Account where id ='0014J000004uVIUQA2'];
driving me nuts.
global class datetime_issue {
@InvocableMethod(label = 'datetime_issue')
global static list<outputCls> getAccounts() {
outputCls out = new outputCls();
out.acc = new account();
out.acc.datetime__c = system.now();
out.acc.name = 'datetime issue';
return new list<outputCls>{out};
}
global class outputCls {
@InvocableVariable
public account acc;
}
}
- ZAPEX
- April 01, 2020
- Like
- 0
- Continue reading or reply
Standard Salesforce Connect
I am trying to use Salesforce Connect to connect with another OData external system but it does not bring any of the external objects when I do the sync and it does not project any error.
Can it be that it is because the external OData system has over 3000 tables which is byound the 100 external object Salesforce supports.
I looked anywhere to find what limitation Salesforce Connect has or how to debug but with no success.
How can I find out why it does not work?
Can it be that it is because the external OData system has over 3000 tables which is byound the 100 external object Salesforce supports.
I looked anywhere to find what limitation Salesforce Connect has or how to debug but with no success.
How can I find out why it does not work?
- ZAPEX
- March 21, 2020
- Like
- 0
- Continue reading or reply
System.CalloutException: The URI is invalid.
I am getting System.CalloutException: The URI is invalid when I am calling a Rest endpoint with spaces.
The endpoint I am trying to call looks like this and it has spaces
...../CUSTOMERS?$orderby=CUST asc&$top=100&$filter=CUST gt 0
unfortunately, apex see this as invalid URI.
I tried URL encode but then the service I am calling returned an error. so the call has to include the spaces in the URI
I also tried to set header to 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' although I saw it used only for POST and PUT while I am doing GET
any idea how to resolve?
The endpoint I am trying to call looks like this and it has spaces
...../CUSTOMERS?$orderby=CUST asc&$top=100&$filter=CUST gt 0
unfortunately, apex see this as invalid URI.
I tried URL encode but then the service I am calling returned an error. so the call has to include the spaces in the URI
I also tried to set header to 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' although I saw it used only for POST and PUT while I am doing GET
any idea how to resolve?
- ZAPEX
- June 14, 2019
- Like
- 0
- Continue reading or reply
site.com IPN error
we have a payment solution in which customer can pay using Paypal.
For each payment paypal sent IPN message to our Salesforce site.com to notify us on the new payment. In return Paypal expect site.com page to return status 200 to Paypal. From unknown reason Site.com response status for the IPN request is 401 and not 200. This causes Paypal to resubmit the IPN message multiple times. In case paypal maxout number of retries it blocks the IPN notifications.
do you know why our site.com does not return status 200 to Paypal?
Issue is not persistent. In most cases we do get 200 status as a response.
for example at 24/12/2016 18:54 GMT+02:00
when Paypal called http://kornit-service.force.com/Paypal
the returned status from site.com was 401 while we expected to get 200.
Please advise
For each payment paypal sent IPN message to our Salesforce site.com to notify us on the new payment. In return Paypal expect site.com page to return status 200 to Paypal. From unknown reason Site.com response status for the IPN request is 401 and not 200. This causes Paypal to resubmit the IPN message multiple times. In case paypal maxout number of retries it blocks the IPN notifications.
do you know why our site.com does not return status 200 to Paypal?
Issue is not persistent. In most cases we do get 200 status as a response.
for example at 24/12/2016 18:54 GMT+02:00
when Paypal called http://kornit-service.force.com/Paypal
the returned status from site.com was 401 while we expected to get 200.
Please advise
- ZAPEX
- January 04, 2017
- Like
- 0
- Continue reading or reply
how to show milestone remaining time on case list view.
Hi ,
wondering if someone found a good way to show milestone remaining time on case list view. note that in this scenario in question the milestone overall time is less than an hour so it is not useful to schedule any process to bubble up milestone times to case.
thanks
wondering if someone found a good way to show milestone remaining time on case list view. note that in this scenario in question the milestone overall time is less than an hour so it is not useful to schedule any process to bubble up milestone times to case.
thanks
- ZAPEX
- April 04, 2016
- Like
- 0
- Continue reading or reply
Email forward to email-to-case
Hello all , I have a situation in which an agent is getting work emails to his private inbox and he would like to forward them on behalf of the customer to salesforce and to create new case. The problem is that if the customer forwarding the case to the support inbox which has a redirect rule that redirect emails to salesforce email2case address the new created case web address is the agent and not the original mail sender (the customer). This causing afterward an issue to set the contact on the case.
Any idea how we can get the original sender to show on the case and not the agent who did the forwrading on his behalf?
Same situation works perfect on desk.com.
Any idea how we can get the original sender to show on the case and not the agent who did the forwrading on his behalf?
Same situation works perfect on desk.com.
- ZAPEX
- March 21, 2016
- Like
- 0
- Continue reading or reply
java.util.GregorianCalendar Flow error
I am using Flow to run an API call to an external system that in turn return a record structure, One of the records fields is a datetime field type. When I try to access the record datetime field in a screen element (or any other element) I am getting the below error
class java.util.GregorianCalendar cannot be cast to class moduleapi.interaction.DateTime (java.util.GregorianCalendar is in module java.base of loader 'bootstrap'; moduleapi.interaction.DateTime is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @4ee37ca3)
below is the Apex Action I use. The Action save its output into an account record variable and then after if I try to access the datetime__c field I get the class java.util.GregorianCalendar error I reported above.Why? if I use date instead of datetime it works. If I initiate the datetime__c like this it works out.acc = [select name, datetime__c from Account where id ='0014J000004uVIUQA2'];
driving me nuts.
global class datetime_issue {
@InvocableMethod(label = 'datetime_issue')
global static list<outputCls> getAccounts() {
outputCls out = new outputCls();
out.acc = new account();
out.acc.datetime__c = system.now();
out.acc.name = 'datetime issue';
return new list<outputCls>{out};
}
global class outputCls {
@InvocableVariable
public account acc;
}
}
class java.util.GregorianCalendar cannot be cast to class moduleapi.interaction.DateTime (java.util.GregorianCalendar is in module java.base of loader 'bootstrap'; moduleapi.interaction.DateTime is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @4ee37ca3)
below is the Apex Action I use. The Action save its output into an account record variable and then after if I try to access the datetime__c field I get the class java.util.GregorianCalendar error I reported above.Why? if I use date instead of datetime it works. If I initiate the datetime__c like this it works out.acc = [select name, datetime__c from Account where id ='0014J000004uVIUQA2'];
driving me nuts.
global class datetime_issue {
@InvocableMethod(label = 'datetime_issue')
global static list<outputCls> getAccounts() {
outputCls out = new outputCls();
out.acc = new account();
out.acc.datetime__c = system.now();
out.acc.name = 'datetime issue';
return new list<outputCls>{out};
}
global class outputCls {
@InvocableVariable
public account acc;
}
}
- ZAPEX
- April 01, 2020
- Like
- 0
- Continue reading or reply
use invocable method to generate dynamic options in visual workflow
I currently have an invocable method being called by a flow. the invocable method return a List<List<String>> in order to send back a list of options, in this case paper types, in a specific order. The flow gets this list returned as a Collection, but I need it to be a dynamic list of options.
Does anyone know how to convert the Collection to this or have my invocable method return this type to the Visual Workflow?
Does anyone know how to convert the Collection to this or have my invocable method return this type to the Visual Workflow?
- Jake Backues
- June 27, 2016
- Like
- 0
- Continue reading or reply
Email forward to email-to-case
Hello all , I have a situation in which an agent is getting work emails to his private inbox and he would like to forward them on behalf of the customer to salesforce and to create new case. The problem is that if the customer forwarding the case to the support inbox which has a redirect rule that redirect emails to salesforce email2case address the new created case web address is the agent and not the original mail sender (the customer). This causing afterward an issue to set the contact on the case.
Any idea how we can get the original sender to show on the case and not the agent who did the forwrading on his behalf?
Same situation works perfect on desk.com.
Any idea how we can get the original sender to show on the case and not the agent who did the forwrading on his behalf?
Same situation works perfect on desk.com.
- ZAPEX
- March 21, 2016
- Like
- 0
- Continue reading or reply
Collection store exception
I have a web service callout that is workign fine, but I cannot get the tests working for it. The ws has two methods; init() and sync(). init() returns a String ans sync() returns List<String>
When I try to mock the response for the two WS methods in my test method, I get a an error:
Collection store exception putting myWS.syncResponse_element into MAP<String,myWS.initResponse_element>
So, it is trying to put one methods response into the response map of the other method.
The WebServiceMock class looks like this:
I also tried structuring it with multiple mock response classes, one for each type of response, but I still get the Collection Store exception.
Thanks for your help.
When I try to mock the response for the two WS methods in my test method, I get a an error:
Collection store exception putting myWS.syncResponse_element into MAP<String,myWS.initResponse_element>
So, it is trying to put one methods response into the response map of the other method.
The WebServiceMock class looks like this:
@isTest public class myWSMock implements WebServiceMock { public void doInvoke(Object stub, Object request, Map<String, Object> response, String endpoint, String soapAction, String requestName, String responseNS, String responseName, String responseType) { myWS.initResponse_element r1 = new myWS.initResponse_element(); myWS.syncResponse_element r2 = new myWS.syncResponse_element(); r1.initReturn = 'response1'; r2.syncReturn = new List<String>{'response2'}; response.put('response_x', r1); response.put('response_x', r2); } }
I also tried structuring it with multiple mock response classes, one for each type of response, but I still get the Collection Store exception.
Thanks for your help.
- MTBRider
- September 03, 2014
- Like
- 0
- Continue reading or reply