Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Make your voice heard. Take the 2019 Developer Survey now

Questions tagged [update]

An UPDATE statement changes the data of one or more records already existing in a table.

0
votes
1answer
19 views

Updating a Record from VF Page

I have a VF page showing a list of records. One column displays the value of a checkbox on the record. VF page snippet: <apex:pageBlock title="List of Incidents"> <apex:...
0
votes
1answer
17 views

Converting java/C# example to update account into php [on hold]

Hi I am struggling with converting the java/C# example to a php script in the attempts to update salesforce accounts. They privde examples here: https://developer.salesforce.com/docs/atlas.en-us.api....
0
votes
1answer
27 views

How to execute class or method after update external id from post callout

I have a custom object in Salesforce with a set of fields. Some of the fields I sent over by an invocable method which calls a future method to send the first set of fields to entity in an external ...
0
votes
1answer
22 views

On record edit, fields value are not populating on modal

when click on the edit button modal is showing and in that modal fields values are not populating when i check debug and console.log record id is showing and set the contact value in attribute. Apex ...
0
votes
1answer
19 views

if picklist label is queried using ToLabel() for an SObject, one cant save updates to this object if picklist is restricted

I followed the article below and got the picklist label-name instead of API name for an object. How to query 'Value' of a picklist rather than the 'API NAME', using SOQL? However ...
2
votes
1answer
29 views

Encrypted Fields Unable to Update in Apex Class - Able to Update in Apex Execute Anonymous

I am using a custom object to store Oauth credentials. I am able to update this object in Apex Execute Anonymous. I am unable to update this object in an apex class. Salesforce Connect ...
0
votes
0answers
37 views

Can System Admin bypass required (lookup) fields?

A user was trying to create a child record but they were getting an error because of other associated record has a required (lookup) field blank. But i was able to create it when i tried as system ...
3
votes
4answers
164 views

|FATAL_ERROR|System.NullPointerException: Attempt to de-reference a null object on my Apex Trigger

I'm kind of new in Apex development and I'm writing a before insert, before update trigger to a custom object that is going to be upserted through an API integration. Is very basic code but I don't ...
1
vote
1answer
22 views

How to use REST API (or preferably Restforce) to upsert and only update when field is blank?

I want to upsert Leads with the following rules: Match by Email If match is found, only update fields that are blank. Is it possible to do this by using API upsert? Is it possible to do it with ...
0
votes
1answer
27 views

After update trigger fires twice, first with no updated info, second with info

I'm writing a trigger that chops up a long-text field on an event activity record and puts it into the appropriate fields on the related contact's record. The problem is, the code seems to be firing ...
0
votes
1answer
23 views

Update record page after record is updated by calling external API

I have trigger on contact which validates phone by calling external API. To be able to call the the API from trigger, I'm using future annotation. The callout method writes the result to custom field ...
1
vote
2answers
50 views

Does Database.SaveResult, Database.DeleteResult, etc. implement a public interface?

The various DML operations (insert, update, delete, etc.) all return results with very similar methods and properties. It is not uncommon, as a developer, that I should want to handle these results ...
0
votes
1answer
55 views

Restrict update existing record while upserting from Data loader

I am going to load data using WorkBench/Dataloader using UPSERT (ExternalId__c) DML operation. Once this ExternalId__c is matched then we have to check one more thing like Sr_number__c in that ...
0
votes
1answer
55 views

UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record or 200 records - Error even after using FOR UPDATE

I have a trigger and I am calling a queueable job from trigger. Sometimes I get this error: Update failed. First exception on row 0 with id a0VN00*********; first error: UNABLE_TO_LOCK_ROW, ...
0
votes
0answers
47 views

How To Update Records Related Through Child Junction Object Without Code

I have a series of objects which are Master Detail. Based on Criteria of when each object should be active I'm deactivating or activating Master & Detail records through Process Builder. This all ...
0
votes
2answers
99 views

Cannot update contentDocumentId in contentDocumentLink

I am sharing a file with a task by creating ContentDocumentLink. The LinkedEntityId points to the task record. Now, if a certain update happens to a parent record then i am trying to update only ...
0
votes
1answer
69 views

workbench cvs update set field to null

In Workbench I am query Account and I want to set ParentId to null (there are some bad id's and I want to clear them). However when I clear out the cvs file and update using workbench the values are ...
0
votes
1answer
38 views

Update list from static method

I have a static method and it has this annotation @RemoteAction so it can be called from java script, I query a list in this method and I want to change a field value and update the list, this doesn't ...
0
votes
2answers
12 views

How do I use the Java API to update only a single attribute on a record?

I'm using Java 8 and v 33.0 of the SalesForce API. We are trying to update a single field on a record. Basically we are trying to do it like this final CventSession__c ...
1
vote
1answer
65 views

Need to set Shipping Address to Billing Address when Account Type is A or B

I'm really new to this platform (one week barely, although the programming logic is the same for everything) and I'm not able to solve this. I have added two new choices to the Type picklist of the ...
0
votes
1answer
98 views

Using Maps instead of nested for loops in APEX

Hi i'm really new to Salesforce development in the following code I'm trying update existing record to inactive but, not the coming record on two different conditions. I'm a bit confused in the last ...
0
votes
0answers
26 views

FATAL_ERROR|Internal Salesforce.com Error updating a record list

I am getting the subjected error while executing an update on an Apex class. Basically I am trying to update a Decimal field and I am getting the error : @AuraEnabled public static void ...
0
votes
1answer
22 views

Need to send data through API upon record update

I am trying to push data through the API to a semaphore box when the following occurs. I am a complete beginner and need help writing this apex class: We have data submitted through a form to start a ...
0
votes
1answer
29 views

Anonymous window Too many SOQL queries: 101

I've tried to execute the following script: List<Task> taskList = [SELECT status, CalculatedWorkingHours__c FROM Task WHERE CalculatedWorkingHours__c = -1.0 AND status = 'Completed']; ...
0
votes
1answer
48 views

Can't change picklist-field value in apex

I have to insert a new record that has a field with of type Picklist (Multi Select), and I get this error trying to insert: TestValue is a value already added in the values list. bad value for ...
0
votes
1answer
27 views

Pass Subject and Description in new Case

I have an after insert trigger that is updating cases and I want to be able to pass Subject and Description on with casesToUpdate. Below is the code. I do not want to change the Subject or Description ...
1
vote
2answers
58 views

Apex Trigger Update Case With Account Id Bulk

I have created an apex trigger that will update the accountId on the case. I don't think this will work for bulk inserts and was wondering if someone could glance at this and suggest an edit or to. ...
0
votes
1answer
40 views

How to tell which Validation / Workflow rule caused exception?

I am using a batch class to mass change the case owner from one queue to another, but during the update process I am returned the following exception: FATAL_ERROR System.DmlException: Update failed. ...
1
vote
1answer
87 views

Getting error: 'Update Failed… DUPLICATES_DETECTED' even with duplicate rule set to 'Allow'

I am trying to update a list of Contacts which is failing because of duplicate being detected. My duplicate rule field 'Action on Edit' and 'Action on Create' is set to Allow. code: if(...
2
votes
2answers
20 views

Update Existing Historical Bulk Records to fire a trigger

I need help with updating existing bulk records just for the sake of firing a trigger. Below is my situation: We have more than 1 million contacts in our org. Recently we installed a managed package....
1
vote
1answer
102 views

move all child records from one account to another efficiently

I did a bit of searching and didn't come up with anything so apologies if this is a duplicate, but - Situation: I am looking for a way to migrate all related object records from one (bad) account ...
1
vote
2answers
45 views

Best way to process the records in After Update triggers - Sets or Lists

This may be a very primitive question but am failing to choose the best way and am trying to follow the best practices. We have many Salesforce Apps implemented, as a result there are many record ...
0
votes
1answer
38 views

Update record in custom Object and Table

I have a table that is populated from values from a custom object. For each record, I have an <apex:inputField> that shows the Quantity value for a record and the user is able to modify the ...
4
votes
2answers
116 views

Adding to a List changes all previous additions

I've been working as a developer for about 3 months, so my terminology may be off. I'm trying to add records to a custom object. As the new record information is added to a List, the previous ...
0
votes
0answers
24 views

Updating Child records from upadting a field in child record

I have created four contacts for an account. I want to update child records of an account.If I update lastname in first record of my contacts to 'AAAA' then the lastname for the remaining three ...
1
vote
1answer
33 views

Not able to update records using trigger

In a trigger I am trying to update values of child records which are pulled from a perent record. I can see the updated data in the debug statements but the actual records are not getting updated. ...
0
votes
2answers
194 views

Update an object field

How could I go about updating a field value of an object? For example, I have an object of type A and its id is 474xxxxxxx. The object of type A have a field f which type is a Picklist. I have a ...
0
votes
1answer
64 views

Adding an update to a Select Query

I have the following query I'm running to fetch records where the Order_Exported_to_A = False and I want to update that field to True once that record is pulled. SELECT Name, ...
1
vote
2answers
170 views

Update field datetime to NOW() when chatter added to case

At present I am trying to use a workflow rule to update a field (Last Chatter Date/Time) which I have set to update whenever an update is added to a case. At present chattering on a case doesn't seem ...
0
votes
2answers
148 views

Referencing WhatID in tasks?

I have a lookup on Teams called Managers (User Lookup). When a task related to Teams is completed, I want to update a field on tasks called match and also update a field on Teams called completed ...
1
vote
1answer
42 views

Array is not updating when the reference which was passed as an argument to the component is updated

Array is not updating when the reference which was passed as an argument to the component (in which update does not happen) is updated. Let me provide the code first. campingApp.app : <aura:...
3
votes
1answer
52 views

How to merge methods into one

How can I merge these two methods that just set the date for child records when the parent record changes? Or should I just keep them separate? public with sharing class Tables { public static ...
-2
votes
1answer
68 views

Update a field when click on the link in an email [closed]

marketing manager will send an emails to customers. in the email template there would be 2 buttons, Optin and Opt-Out.depends on the button customer clicked, need to update a field in salesforce....
1
vote
1answer
524 views

force:recordData for Update OR Create

I can't seem to allow force:recordData to update records. I am able to make it create new records without any problem. I think the problem is in the attribute of the component? Or perhaps I am not ...
0
votes
1answer
156 views

Create Child Record if a lookup on a Parent Object Changes

I'm pretty close to being maxed out on workflows for my custom objects. So I decided to see if apex classes could help, I'm still currently trying to learn how to write triggers and classes so Im ...
-2
votes
1answer
265 views

How to Update AccountContactRelation table of a Contact

I am trying to update a Contact's(Primary) AccountContactRelation object with a list of Accounts that are from a list of selected Contacts(accounts tied to them). Here is my approach: public Contact ...
0
votes
0answers
28 views

Picklist Field Not Updating Due to Disabling/Enabling Behavior

This post is related to this: Custom Picklist Field Not Updated When Value is Changed. At first, I was wondering why picklist field is not updated every time its value is changed. But then, someone ...
1
vote
2answers
50 views

How to update a record in salesforce using a link which sent in an email template?

use case I need to send an email to all my contact stating that We have following information of urs in our production instance. User will decide whether they want to keep that information with us or ...
0
votes
2answers
181 views

Setting DMLOptions in an update

I am currently trying to bypass a DMLException thrown by a duplicate rule in an update event just like I bypass it in an insert events, that is by setting the DMLOptions.DuplicateRuleHeader.allowSave ...
0
votes
2answers
79 views

How to update account with asset value in batch class

I have some assets related to accounts with a checkbox that need to update a checkbox on account. I tried to update the parent record but this gives me a nulpointer exception on line: ass.account....