An exception denotes an error that disrupts the normal flow of code execution.

learn more… | top users | synonyms

4
votes
1answer
140 views

Sandbox org TLS 1.1 update breaks outbound calls

This morning, our team arrived to find our sandbox instance in disarray. Salesforce had disabled TLS 1.0 across the entire instance, breaking our homegrown applications that communicate with it via ...
1
vote
2answers
28 views

FATAL_ERROR|System.LimitException: Too many DML statements: 1

Facing an issue when we want to update our payment object in bulk. Works fine on sandbox but throws an exception error in production. Mentioning the controller below. The Error occurs at update ...
0
votes
0answers
33 views

SOAP service callout with a certificate - External server did not return any content

I have a SOAP service certificate that I added to Salesforce and created a Named Credential with it. I generated classes from WSDL, and I replaced the endpoint_x with: public String endpoint_x = '...
1
vote
2answers
23 views

Locate First Error Name in Exception Object

I see message like this Insert failed. First exception on row 0; First error: SOME_NAME_OF_ERROR I want to get this message in catch block and store it in variable, for example: String ErrorName = ??...
0
votes
0answers
11 views

Random CommunicationException while retrieving email events with SOAP API

We use the Retrieve method of the SOAP API to obtain email related events (sends, opens, clicks, notSent, bounce). This operation is being executed periodically during the day and mostly it works ...
0
votes
1answer
20 views

Extract only the error message in custom exception message

Class: (Custom Exception) public class CustomException extends Exception { } Using as below in my help class: throw new CustomErrorException('No other characters allowed'); This is working ...
1
vote
0answers
43 views

Need help || System.VisualforceException: Read access denied for null, controller action methods may not execute [closed]

Please help me resolve this VF Code <apex:outputPanel rendered="{!if((showDone && alreadydeparted), true, false)}" id="nextBtnPanel"> <!-- ACTION STATUS FOR DISABLE ENABLE NEXT ...
0
votes
0answers
36 views

Webservice Error: Apex type not found for element

I've been working with web-service call out and the other party changed the wsdl. After regenerating apex code using new wsdl, I get an error when invoking the web-service saying 'System....
1
vote
3answers
62 views

Test Class for Catch Exception getMessage

I have a class that includes the following: try { stuff.... }catch(Exception e){ ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR, e.getMessage()+'ERROR')); ...
2
votes
2answers
112 views

Testing AuraHandledExceptions?

It seems like when I call getMessage on a thrown AuraHandledException, I see "Script-thrown Exception" instead of the message that I have set. Any idea why this may be happening? Controller: @...
0
votes
1answer
25 views

How can I customize the ExceptionMessage thrown by Apex Class?

I am getting the following message on my VF page. common.apex.runtime.impl.ExecutionException: Unable to Parse Date Value I wish to suppress the first part of the message which is common.apex....
0
votes
0answers
20 views

Getting Exception on Test endpoint https://webservice.test.exacttarget.com/Service.asmx on every request in Production Support environment

Getting below exception on Production Support. Same code is working fine on Production Environment. Is there any issue in hosting of webservice.test.exacttarget.com/Service.asmx service ? ...
0
votes
0answers
17 views

Gacks Error from server side

One of our customer has reported a issue where he got the below message while making an apex call. "Temporary PerEntitySchema mismatch: occasional occurrences are ok. DO NOT file a bug unless you see ...
3
votes
2answers
64 views

What's the uncommitted work on this callout test?

I'm gettin You have uncommitted work pending. Please commit or rollback before calling out.. Exception while Running a Test of the class i will attach. This class is invoked by onTask Trigger (...
0
votes
2answers
39 views

Testmethod problem: System.QueryException: List has no rows for assignment to SObject

I have the following method in which SOAP webservice is consumed created by wsdl2apex (only necessary part is shown): public class SendOrder { public void SendOrder(string OrderId) { // ...
9
votes
1answer
333 views

JSON: Cannot deserialize instance of date from VALUE_STRING

I'm officially breaking up with Salesforce Date parsing. This has got to be the most frustrating thing. I have the following date in a JSON string (full JSON below): 2017-06-03T10:34:24.000Z ...
3
votes
1answer
46 views

Catching exceptions when using Batchable with custom Iterable/Iterator

When using a custom Iterable/Iterator class with Database.Batchable, if the Iterator throws an exception it seems impossible to catch the exception. Is there any way to catch the exceptions thrown in ...
0
votes
1answer
37 views

System.NullPointerException: Argument 2 cannot be null

I am attempting to handle exceptions within the context of using a custom object that we have to display error messages. I want to capture any exception or dmlexception messages and use them in the ...
0
votes
0answers
14 views

The webservice callout from salesforce to external system to get the auth token has stopped working

When I send a request to external system its throwing an exception "System.CalloutException: Received fatal alert: protocol_version". This was working fine till yesterday and also working fine in QA ...
3
votes
2answers
208 views

Resource is inserted even thought it has a conflicting schedule with another event

I am using standard Public Calendars and Resources where I have 2 types of resources, Vector Unit and Demo Unit. Now if any of the resources have a conflicting schedule, a standard Salesforce error is ...
0
votes
0answers
144 views

Not Serializable: com/salesforce/api/fast/List$$lcom/salesforce/api/Messaging/SendEmailResult$$r

I am getting the above exception when send SingleEmail without setOrgWideEmailAddressId .What is the reason.Can anybody help Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();...
0
votes
1answer
39 views

NoAccessException on ConnectApi.ChatterFeeds.updateFeedElement : line 706 column 1

Urgent Help Needed: I am getting exception while updating a chatter feed using ConnectApi.ChatterFeeds class. I am not getting it regularly but for some specific users under a particular custom ...
2
votes
1answer
65 views

Opportunity.IsPrivate via Apex but not Developer Console?

I'm trying to query all of my Opportunity fields at runtime by using Schema.SObjectType.Opportunity.fields. This seems straightforward, but I am seeing some strange behavior when I put some of my ...
1
vote
1answer
32 views

Can you catch a thrown error down the line?

I'm trying to setup a method to make sure all the data I need is available before proceeding to the next part of my component. So I have something like this: public Boolean getIsDataLoaded(){ /* ...
6
votes
2answers
94 views

Why log status is success and not failed?

Lets say I have a VF page and a controller. I would like to know why I don't see any errors coming on the log status when there are exceptions thrown when the code runs. I am trying to deliberately ...
3
votes
1answer
28 views

sosl exception on searching with one character

On doing a sosl search with just one character search parameter, I am getting an exception. To overcome this i have used custom error message in the catch block.However I am unable to cover the catch ...
3
votes
1answer
56 views

Can Built-In Exceptions Be Thrown?

In Creating Custom Exceptions, the documentation still claims: Since you can’t throw built-in Apex exceptions but can only catch them, you can create custom exceptions to throw in your methods. ...
0
votes
1answer
52 views

Attempt to dereference null object error

I have below controller where I get Attempt to dereference a null object error at ProdIds.add(c.id); Line. Error Code public TestController(ApexPages.StandardController stdCtrl) { ...
0
votes
1answer
38 views

List out of bound exception at List<Blob>

I have below piece of code where I get below error. Here b is the List of blobs. Error List index out of bounds: 3 Apex Code for(integer i = 0; i <counter; i++) { Messaging....
2
votes
2answers
79 views

Assertion failure that a null pointer exception is caught

I am doing some test code right now. In my Apex code I have a method that try-catches a DMLException and afterwards does a general Exception catch. In my test code I am successfully managing to test ...
0
votes
1answer
62 views

Apex Exception Handling sending Email

I am trying to send an email whenever an exception occurs. The issue I think is the catch part is not firing. as the email are going when written outside catch part/ public class WebServiceCallout { ...
5
votes
1answer
68 views

Internal Salesforce Error (GACK) Deleting Account w/ restrictedDelete ContentVersion

I recently 'succeeded' in getting an Internal Salesforce Error aka GACK. Per Josh Kaplan's blog page, I am posting the details and cause in case someone else runs into this before SFDC fixes it. And ...
3
votes
3answers
116 views

Revert/rollback record states on error

Consider the following block of code that is called on save of a basic data entry page: public PageReference save() { // accounts is binded to VF page for (Account a : accounts) { ...
1
vote
2answers
49 views

batch class Run fine with individual record but not working fine with multiple records

I am writing batch class to deactivate users if no dependency and freeze user if any dependency.When i hardcode singal value of userid and run batch it works fine it deactivates user.It is not going ...
1
vote
2answers
75 views

Page message Problem?

I have four scenarios with catch exceptions in controller and used "apex:pageMessages" only once in Visualforce page.But that is not working for all the scenarios? Is it mandatory to use "apex:...
0
votes
3answers
98 views

Not able to catch exception using try catch block

I am using try-catch block to catch exceptions.code is executing inside try block.Exceptions happens which i am thinking i am handling in catch block.When i debug whole code after exception code is ...
1
vote
2answers
76 views

SendEmail error: You have uncommitted work pending

My code works everywhere except in a particular client sandbox. It basically sends an email on insert of a record. Pseudo-code in PKG A trigger on after-insert of recordX Messaging.sendEmail(...
1
vote
1answer
16 views

Visualforce-Community: Is it possibe to override the errorpages AND get there a full Exception display including StackTrace?

Working on Communities, but getting only the generic Errorpages is not useful for managing bug-reports. By default it looks like this: I know how to override that here: I would like to see as ...
1
vote
0answers
17 views

On saving page error : List controllers are not supported for OrderItem [duplicate]

I am trying to do edit for selected OrderItems using StandardSetController, however, when I am saving page, I am getting following error. List controllers are not supported for OrderItem. ...
0
votes
1answer
40 views

Change Salesforce Error Messages?

Currently when Apex code on a VisualForce page throws an exception the user is shown what line of code threw the exception and some other information. I want to change this to show a custom error ...
0
votes
2answers
57 views

Facing System.NullPointerException: Attempt to de-reference a null object issue

There is an issue with the test class: Error Message System.NullPointerException: Attempt to de-reference a null object Stack Trace Class.AnalyzeObjectBatch.start: line 30, column 1 global ...
1
vote
2answers
68 views

How to unit test exception handling when the source of an exception is external to the code being tested

Let's say we have some class MyClass: public class MyClass { public void doSomething { // do some stuff try { OtherClass.staticMethod(); } catch (...
0
votes
1answer
24 views

Attempt to dereference a null object

I am running tests on the following code: global class CarrierTrackingBatch implements Database.Batchable<sObject>, Database.AllowsCallouts{ global String ShippingStatus; global String query; ...
5
votes
3answers
165 views

Customer Community Plus User Cannot Add Other User

Within my community there are customer users with Customer Community Plus licenses who are considered to be "company admins" for their respective companies. A company admin needs to be able to add ...
1
vote
1answer
61 views

Getting System.CalloutException: You have uncommitted work pending. Please commit or rollback exception even after @future call

I have done following things and i don't think i should get his Exception - 1) Logger.debug(LoggingLevel.INFO, 'Custom Message'); - A custom logger class 2) after above logger a call out to other ...
1
vote
1answer
76 views

Batch Job Error: Too Many queries: 50001

public class UpdateBrandBatch implements Database.Batchable<sObject>, Database.Stateful { final List<SObject> records = new List<sObject>(); final string query1, query2; ...
1
vote
1answer
42 views

Getting System.CalloutException: You have uncommitted work pending [closed]

I am getting an exception of System.CalloutException: You have uncommitted work pending. Detail of the Exception is given Below: Exception: :System.CalloutException: You have uncommitted work ...
3
votes
1answer
118 views

How to over write salesforce standard exception message in catch block?

I am using catch (Exception e){ ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.FATAL,'my error msg'); ApexPages.addMessage(myMsg); } And have <apex:pageMessages/&...
0
votes
1answer
49 views

System.NullPointerException: Attempt to de-reference a null object apex test classes

The Below code is a test class where I get my null pointer exception app Builder: public with sharing class appmaker extends packmaker { public override String buildpack(Object[] records) { ...
0
votes
2answers
56 views

How to handle error thrown by Validation rule when a trigger fires?

I have a trigger on "Opportunity" object which on record update also updates it "OpportunityLineItem" records. We have a validation rule on "OpportunityLineItem" that if a field is blank the error ...