Skip to main content

Questions tagged [dmlexception]

Any problem with a DML statement, such as an insert statement missing a required field on a record.

0 votes
0 answers
36 views

After activating PersonAccounts and running all tests, i run into the following error: System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, ...
Gilles's user avatar
  • 1
-2 votes
1 answer
176 views

I have a function in an Apex Class which is called with an HTTP Post via a REST Api Apex class. One of the things it does is to update Account records (selected with a SOQL query in the failing method)...
cyberspy's user avatar
  • 246
0 votes
2 answers
168 views

I try to implement insert as user and catch fields that user has no access to them but I face with problem that method does not exist. try { update as user items; } catch(DMLException e) { System....
Ярослав Пажух's user avatar
-1 votes
1 answer
449 views

I am facing a strange issue in salesforce org. This org has Personaccount enabled. Whenever a user go to person account page and tries to edit it user is getting error Required field is missing [...
Manjot Singh's user avatar
  • 3,616
2 votes
1 answer
338 views

We have a class created with sharing that inserts a record as a user. I've created a test class and added a user, along with the related PermissionSet assigned to that user. However, when I run the ...
OztheWiz's user avatar
1 vote
1 answer
63 views

I am trying to assign value to compound field(FirstName) for specific record type. But got an error. "System.DmlException: Insert failed. First exception on row 0; first error: ...
Muhammad Jahanzaib Tariq's user avatar
0 votes
0 answers
72 views

I'm making an api callout from einstein bot and waiting for the response to show in the chatbot the isssue is that the api needs a token that expires for every six hours to get resolve that I'm ...
bnthsrikanth's user avatar
9 votes
2 answers
2k views

I couldn't find if SOQL and DML become interlinked when using WITH USER_MODE with SOQL and DML both in single transaction. I've below sample code to be triggered on a button from an LWC: @AuraEnabled ...
VarunC's user avatar
  • 6,070
-1 votes
1 answer
73 views

I insert lists that are created from pre-existing data. In my @testSetup I create the mockup but it's 'impossible' to enter the DMLException when trying to achieve 100% code coverage. This is my code +...
Alexis MASSON's user avatar
0 votes
1 answer
198 views

public with sharing class CSVController { @AuraEnabled public static string loadCSVData(Id contentDocumentId, string fileType){ ContentVersion contentVersionObj = [ SELECT Id, ...
utkarsh singh's user avatar
2 votes
0 answers
256 views

I'm trying to do a DML with user mode in apiVersion 58.0. I got "DML Exception" while inserting records without field permission and I got "SecurityException" while inserting ...
Senthil Kumar's user avatar
0 votes
1 answer
2k views

I am trying to store the attachments from an incoming email to the ContenDocument, ContentVersion, and ContentDocumentLink objects. Below is the method/function: @testVisible private static void ...
Marjan's user avatar
  • 15
0 votes
1 answer
96 views

I have a custom object and it's related history by activating the history tracking of its field. However, I don't really understand why it's not updating my custom object field? Can someone please ...
ratRiot01's user avatar
0 votes
1 answer
748 views

I'm trying to update a field on the account field with a trigger using after insert and update. I am using a future method to make a callout to a rest API to get the rate of BTC in USD. My issue is ...
Carraig's user avatar
0 votes
1 answer
2k views

I'm getting this error when creating an Account inside a Test class. I'm using the System Admin profile to execute the tests, and this profile has permission to edit the Account Name field (mentioned ...
Emmanuel_M's user avatar

15 30 50 per page
1
2 3 4 5
12