Questions tagged [saveresult]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
116 views

Task - Save & Close

Working to smooth agent workflow by setting the tab (in salesforce) the task is open in to, "close" after the "save" button is clicked. Currently when the user clicks, "save&...
Steve Smith's user avatar
0 votes
1 answer
316 views

Attempted to upsert a null list Error is in expression '{! save }' in component

The full error I am getting: Attempted to upsert a null list Error is in expression '{! save }' in component apex:commandButton in page casepage: Class.CaseController.save: line 15, column 1 Here is ...
Sarah's user avatar
  • 15
1 vote
1 answer
852 views

How to get Platform Event custom field value from Save Result or Database Error in Apex

If my Platform Event is configured to have a custom field Key_Field__c. How do I get the value of Key_Field__c on the Platform Event object which has failed when using EventBus.publish() void ...
Robs's user avatar
  • 9,187
1 vote
0 answers
261 views

Database.saveResult showing only one error at a time

I am trying to write an apexrest service that takes in fields for the Opportunity Object. There are certain restrict picklists on the Opportunity object that I've created. Additionally there are other ...
N_H1922's user avatar
  • 315
0 votes
0 answers
313 views

AsyncSaveCallback not working in apex

I am trying to insert records to an external object and get the Id back for the inserted record I have the following piece of code Database.SaveResult[] insertResultAccount = Database.insertAsync(...
Madhurima's user avatar
  • 1,265
0 votes
2 answers
1k views

Test Coverage for Custom Error Logging

I created a custom object to store errors in my code. So I am updating some of my classes to take advantage of this object, but I am now running into issues with test coverage. I am taking advantage ...
Chance's user avatar
  • 1,050
3 votes
1 answer
582 views

Ignore Duplicate Results Alerts for Visualforce Page

I have a [visualforce] page with a [standard controller] and a an [extension] that [queries] a child and grandchild of the standard controller. The grandchild records have a [duplicate] match rule. ...
user51949's user avatar
1 vote
1 answer
702 views

Can we save list of OpportunityLineItems using lightning data service <force:recordData?

I am trying to create multiple opportunity products and quotelineitems for respective opportunities and quote. I have already inserted the opportuity and quote using lightning data service. But I ...
Mahesh Panda's user avatar
0 votes
1 answer
117 views

Allow the insert of Custom Records even if some of them fail as duplicates

I want to ignore a bunch of records (Custom settings in fact) and want the transaction to ignore Duplicate errors. All other errors should make the insert fail. If a duplicate exists simply skip the ...
Robert Sösemann's user avatar
2 votes
1 answer
1k views

DML Database method is covered by unit tests, how to determine reason for no test coverage of the SaveResult variable?

The blue indicates test coverage. The red indicates uncovered code. Where would I find the cause for the uncovered code? public List<Opportunity> insertOpportunityAndDefineRelationships(...
Peter Noges's user avatar
  • 1,100
1 vote
1 answer
47 views

Compile Error on batch class to fetch fields from saveresult

I have below code to fetch field values from records of Database.Saveresult. I am getting error as below. Error Expression of type Database.SaveResult has no member named Territory_Name__c Code ...
Testing_SFDC's user avatar
  • 2,940
0 votes
0 answers
44 views

Referencing one field in order to delete row if you save the record

Just want to ask if it's possible to save the record on the first row if it's completely fill-up the 4 fields, and the 2nd row will be automatically deleted when there's no SkillName if you save that ...
boy george's user avatar
1 vote
2 answers
470 views

Prevent insert if object in list is not valid and find which record is invalid

I am developing lightning component, on which user enters data in table and creates multiple records. If some records do not pass validation - row has to be highlighted with red. For this I need to ...
Vladyslav K's user avatar
  • 2,713
0 votes
0 answers
31 views

How to Save my Picklist Records after clicking Save Button

I am Having 10 different VF page for my Custom Object FeedbackFrom__c. Every Page having 1 Pick list Field at page no 11 i am having Save Button if i click save Button every records should save ...
Anjaan's user avatar
  • 63
-4 votes
1 answer
238 views

My Save Button is not working

I have one custom object called (FeedbackFrom__c) in that I having 10 fields, each fields having different VF Pages at page no 11, I am having one save button if I click that automatically 10 fields ...
Anjaan's user avatar
  • 63
4 votes
1 answer
3k views

Why does my Lightning Component go into an infinite loop and fail to save?

I'm currently trying to refactor the Discover Lightning Actions source code into something which wouldn't make my eyes bleed on a professional project. At present, my CreateUser.cmp looks like this: ...
Brian Kessler's user avatar
0 votes
1 answer
214 views

Edit Table does not update database after save

I have the problem that my editable table does not update when I hit the "save" button. I tried inline editing and normal editing, nothing would save. Although I referred to a standard controller, I ...
Andrea Voggenreiter's user avatar
1 vote
1 answer
3k views

Get field values of newly created record other than Id

Is it technical feasible to obtain fields like OwnerId, Name from newly inserted record from database.Saveresult? Apex code: for(Database.SaveResult sr: srList){ if (sr.isSuccess()) { Id ...
Testing_SFDC's user avatar
  • 2,940
2 votes
0 answers
20 views

Is there a parent class/interface for DML Result classes? [duplicate]

I have a generic method that performs DML operations. I want it to return a result list, and I am wondering if there is a parent class/interface that DML Result classes derive from. All DML Result ...
Mossi's user avatar
  • 3,906