Questions tagged [error-messages]

A reference to text or codes that's displayed on a screen or written to a log from numerous possible sources including: system debug logs, page messages, exception handlers, API's such as REST, etc., that will often contain diagnostic information helpful in troubleshooting the actual source of an issue that caused an operation to fail.

Filter by
Sorted by
Tagged with
41
votes
2answers
73k views

How to fix insufficient access rights on cross-reference id?

I am getting the error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: [] Scenario is, I am inserting an Opportunity and then Opportunity Line ...
32
votes
10answers
44k views

How to debug the mysterious “duplicate value found: <unknown> duplicates value on record with id: <unknown>” error

I've just spent several hours trying to fix a deployment that was failing with the following extremely helpful error message: Error: objects/Opportunity.object(2098,13):duplicate value found: <...
27
votes
1answer
63k views

Can anybody explain the UNABLE_TO_LOCK_ROW error?

Error Message: Developer script exception from Nicomatic : quotepotential : quotepotential: execution of AfterUpdate caused by: System.DmlException: Update failed. First exception on row 0 with ...
17
votes
1answer
2k views

Adding an error on a dynamic referenced field

Is there a way to add an error on a dynamically referenced field? Let's take this simple example: opp.get('Name').addError('Invalid name'); This is not working, I'm looking for a similar minded way. ...
16
votes
5answers
6k views

When do we really need try/catch?

I know about 'always in DML operations'. But for what? What do we get? The code will crash anyway, and we can find the error in logs even without this construction. What's the main point of try/catch? ...
14
votes
1answer
5k views

Inserting a link in an ApexPages message

I was wondering if there's a way to display a link in an ApexPages.Message. There's nothing mentioned in the documentation about it, so I simply did a : ApexPages.Message(ApexPages.Severity.CONFIRM, '...
14
votes
3answers
6k views

Can I throw an exception in apex and still log the caught exception?

I'm really wrestling with the best error handling strategy. My goal is to handle all exceptions that I can identify, log them to a table in the database, and surface a helpful message about what ...
13
votes
0answers
892 views

why is the value in [] for insufficient access rights on cross-reference id: [] always/usually empty?

OK, I know how to debug this error and there are plenty of web resources to assist so please don't answer with those techniques. What I'm more after is why the ID value in [] is typically null for ...
12
votes
5answers
7k views

Organization Administration Locked…?

After having my Developer Console not be able to save a class that I edited, I faced this error message when trying to edit/save the class directly in the browser: Organization Administration Locked ...
11
votes
1answer
474 views

Bests practices for handling potential errors as a result of time based workflow

Question Any tips or tricks for providing a good user experience when a time-based workflow field update can lead to an exception? Detail For each wrench in the Salesforce toolkit there is often a ...
10
votes
5answers
12k views

Clear Apex:PageMessages without losing viewstate

Is there a way to clear the PageMessages in my controller without losing my Page's viewstate? At the moment I'm doing a ajax call from my visualforce page, which rerenders part of my page, but this ...
9
votes
3answers
7k views

What controls the 'severity' of ApexPages.addMessages(exception)?

I'm trying to crystallize out some 'best practises' for Visualforce Page exception handling. I think, at a minimum, a page should look something like this: <apex:page controller="PageController"&...
9
votes
2answers
3k views

Format a Validation Rule Error Message

I would like to include line breaks within a Validation Rule Error Message without the use of Visual Force. Is this possible?
9
votes
3answers
8k views

How separation of Test Class can solve 101 SOQL Queries Limit Exceeded Error?

Recently one of my colleagues was trying to deploy to production some opportunity trigger activation, but during validation deployment two of ten test methods from TestMyMysteriousApexClass failed ...
9
votes
2answers
6k views

Issue with error messages on Lighting:recordform

There seems to be an issue with the error handling on lightning:recordForm, and some real limitations on lightning:recordEditForm. Trying to determine if this is a bug or a mistake on my part. ...
8
votes
3answers
5k views

Error: j_id0:j_id1:j_id28:j_id30: Validation Error: Value is required

I am getting above ugly error.How to clean the error without custom error handing in controller. <apex:page standardController="Account" extensions="EventController"> <apex:form > <...
8
votes
2answers
3k views

Can we have a DML not roll back when i use an adderror method?

We have a scenario where in the before insert trigger of object Asset, which looks for a duplicate and if a duplicate is found a record is inserted in the junction table and after the dml is complete, ...
7
votes
1answer
865 views

Difference between ApexPages.Severity FATAL and ERROR

After looking into all options, it seems that ApexPages.Severity.FATAL and ApexPages.Severity.ERROR are exactly the same. Is there a difference that I'm not aware of?
7
votes
1answer
1k views

Can you make trigger exceptions pretty in standard page layouts?

We have a situation where it is possible for a trigger to throw an exception that will be shown to the end user. This isn't ideal as the user sees a lengthy message containing what is essentially a ...
7
votes
1answer
655 views

How to display error message to User when InvocableMethod throws an exception

Background I am using Process Builder to run an Apex InvocableMethod which sends some data to a 3rd party REST API. Sometimes the 3rd party REST API returns a validation error. Question How can ...
6
votes
2answers
8k views

Customize standard error message on the visualforce page

I want to customize the error message box which comes for various errors. i want only a single custom message for all types of errors and also a different custom icon. How can i implement this?
6
votes
3answers
3k views

Salesforce SOAP Exception - Expecting Envelop found Fault

I have a problem with parsing a response I am receiving via a SOAP callout in Salesforce. The error I am receiving is : Web service callout failed: Unexpected element. Parser was expecting element '...
6
votes
2answers
9k views

How do I query for the Product Object?

In trying to use a query based on product standard object in a Batch Apex program. select name from product/products returns error even in Developer console. Errors : sObject type 'Product' is ...
6
votes
2answers
10k views

Can we display warning message from Trigger

I am using custom Object, I need a warning message on Detail Page, Is there anyway?
6
votes
2answers
136 views

How to handle error emails from customer orgs as an ISV partner

We currently send all the error emails produced by our ISV package installed in customer orgs to a generic email list. The more packages we have and the more dynamic we assign developers to product ...
6
votes
3answers
7k views

Why does the SOQL parser give a primitive message like 'Unknown error parsing query'?

If you make a mistake/typo in a SOQL query in the Developer Console, you frequently get the - not helpful - message "Unknown error parsing query". I started programming in the early 80s, in BASIC of ...
6
votes
1answer
3k views

Change error message on unique field when there is duplicate

I have custom field which I use together with workflow to insure a unique key on two other custom fields. If user tries to enter duplicate values and workflow tries to populate duplicate value into ...
6
votes
1answer
2k views

Want to overwrite the text content of standard error message displayed on custom page

I am using validation with help of standard error messages on a field. Is there a workaround to manipulate the standard text displayed on error message. ???
6
votes
1answer
2k views

this._setInputValue is not a function

getting a strange issue on a Lightning page. In the background, I'm trying to update a Long Text Area field with Apex (before update trigger) but it seems to throw this error whenever I try to update ...
5
votes
2answers
6k views

Best practice for catching and displaying action errors in Lightning components

There are zillion of ways to handle or ignore errors thrown from actions calls in Lightning controllers. var action = cmp.get("c.controllerMethod"); action.setCallback(this, function(response) { ...
5
votes
3answers
7k views

Display Apex Exception message nicely in Lightning toast

My Apex controller method might throw a custom exception @AuraEnabled public static Id myAction() { // Provoke exception Integer foo = 10 / 0; and I want the toast to display it properly ...
5
votes
1answer
6k views

error handling batch Apex

What would be a better way of error handling in batch apex other than using a n object to insert errors. Can we send error messages to the user in an email from finish method. Currently, I'm doing ...
5
votes
4answers
5k views

How to locate the Country/State error? Which account is the cause?

While in Mass Transfer of Accounts process, I get the following error: Error: There's a problem with this state, even though it may appear correct. Please select a state from the list of valid states....
5
votes
1answer
7k views

LWC: How to get access to proper Error message when statically calling an Apex method from LWC?

I call an Apex method statically. @AuraEnabled public static Id insertx(){ insert new Account(); } From a LWC component: insertx().then( () => {}) .catch(error => {this.error = error;}...
5
votes
3answers
13k views

How to display an error message from a trigger insert failure

I have an odd problem. A trigger was creating a record which failed to insert due to workflow field update being too long for the field. The error did appear in error log, but did not in the standard ...
5
votes
2answers
283 views

sandbox copy error?

I just did a full sandbox refresh. Spent a couple hours debugging code before I finally saw where the null pointer was coming from. In my production org, there's a custom object (position) with ...
5
votes
1answer
1k views

Complete list of Standard Field Validation Error Messages

This is specifically dealing with custom Visual Force controllers that do data validation and error checking prior to attempting to save records via a DML statement. During our validations we will ...
5
votes
1answer
3k views

Salesforce Lightning: Sorry to Interrupt Popup

Okay, so this only happens every once in a while and I don't seem to see a pattern as to when it happens or what I am doing while it happens. If I am navigating through Lightning, sometimes this ...
5
votes
1answer
705 views

Batch Apex class failure - CPU time limit exceeded

I am facing a sudden bug that arose from a custom scheduled batch class in the system. This scheduled job has been running smoothly for over a year now, but it seems as though a recent influx of ...
5
votes
0answers
441 views

problem displaying Community password reset link error messages

In our Community I am using custom Visualforce pages for login and reset password and the change password pages. We occasionally have customers that the password reset link they get via email ...
4
votes
1answer
5k views

LWC Navigation: “this[f.NavigationMixin.Navigate] is not a function”

When attempting to use the Lightning navigation service in my component's base class (.js), I receive the following hard error when functionally testing in the UI: this[f.NavigationMixin.Navigate]...
4
votes
1answer
3k views

NUMBER_OUTSIDE_VALID_RANGE: value outside of valid range on numeric field: 100.0

I get this error in the results of a Bulk API upsert: 'NUMBER_OUTSIDE_VALID_RANGE:Normalized Score: value outside of valid range on numeric field: 100.0:normalized_score__c --' The metadata for that ...
4
votes
1answer
300 views

Is it a good practice to set debug points in possible failure points in our Apex code?

For example we're using validation methods to verify customer address. Since this is a paid 3rd party service used by our client, if client missed paying for the service, data validation would fail ...
4
votes
2answers
9k views

How to resolve an “Unknown user permission: SendExternalEmailAvailable” deployment error

When attempting to deploy profiles, you may encounter the error "Unknown user permission: SendExternalEmailAvailable". What does this mean, and how can you resolve it?
4
votes
4answers
23k views

Trying to create a trigger to prevent creation of duplicate accounts

This is the trigger i have wrote to prevent the creation of duplicate accounts, i am getting an error message saying "Intial term of field expression must be a concrete SObject:LIST ". Can someone ...
4
votes
1answer
205 views

Winter 15 preview new error messages: valueOf() function

We have been experiencing serious issues today with the release of Winter 15 into our sandboxes... Salesforce System Error: 1702643372-49547 (938791604) (938791604) Error is in expression '{!...
4
votes
1answer
615 views

Determine if an SObject has an error

Is there a way to calculate if an SObject in a trigger context has had an error added to it (either with addError or through a validation rule)? I have some trigger processes I don't want to run if ...
4
votes
2answers
6k views

lightning:input Clear validation error messages

I have enabled error messages (validation failed) for Lightning:input components inside my lightning component A using inputCmp.showHelpMessageIfInvalid() I am trying to clear the Lightning:input ...
4
votes
2answers
1k views

Icon maximum length error during deployment

I created a new sandbox and tried to deploy some code changes using Github and CircleCI (CircleCI internally uses Ant Migration Tool). I get this strange error : [sfdeploy] Component Failures: [...
4
votes
3answers
3k views

REST API & Validation Rules error

Question Is there any way to determine which validation-rule caused an error on a POST to REST API? Background I have a customObject A__c which has many Validation Rules. Also, I'm trying to insert/...

1
2 3 4 5
9