Questions tagged [update]

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

Filter by
Sorted by
Tagged with
0
votes
3answers
70 views

Update map.values() doesn't work

I don't know why my object's field from map doesn't change. Can you help me please? public void changeCommentAfterUpdate(List<OppDesc__c> newOppDesc){ Map<Id, Tool__c> mapToConnect = ...
1
vote
0answers
24 views

Reparent child records from different child objects

I have a situation where I have a parent object with around 15 lookup child objects. In a certain business scenario, the parent record will be replaced by another parent record, so that all these ...
0
votes
1answer
50 views

How to update all records through Trigger? [duplicate]

I have to automate the logic with Trigger. If the Comment__c field is updated in 1 Tool__c record, it should be updated in all another Tool__c records. It's about 700-1000 actual records. When I'm ...
0
votes
2answers
334 views

How to support iOS 13 with Xcode 10.2.1?

thanks for your new SDK update (v6.3.5)! Our app is unfortunately not yet supporting Xcode 11. When I attempt building with SFMC 6.3.5, I get this error ":-1: Undefined symbol: ...
-2
votes
1answer
49 views

How to create an apex class to update a field for a specific record id?

How do I create an apex class to update a field for a specific record id? I want to then use this apex class to run based on a process builder This works in open execute anonymous but not when i try ...
0
votes
1answer
25 views

Does mass updating contact records has any effect on Flex queues or Queues

I have a requirement where I have to schedule a job daily to update records on the Contact object in batches via API(about 30,000 a day). Would that impact the Flex queue or Queues by any chance? Just ...
0
votes
1answer
50 views

can too many validation rules cause a performance issue with large data - Apex CPU Time?

I have a bulk update process which effects updates records in more than one salesforce objects like - Account, Contact, Contract , Opportunity and Oppt Line Item. This bulk process does not update ...
0
votes
2answers
45 views

How to implement Apex Batchable properly, need to update ~5M records

I need to update CampaignMember, the value that I need to insert is in Opportunities, but there are more than 4 Million records, I was using Jitterbit and Excel to do this, but is very difficult ...
0
votes
0answers
11 views

update dashboard every one hour

How can we update dashboard every one hour? I tried to update it from subscribe button, but normal subscribe makes it possible to update dashboard automatically only one time in one day. I wanna ...
0
votes
1answer
18 views

Update lead record on javascript button click in lighting

I am new to salesforce lightning. I have a button in classic that update the lead status. But I am not been able to figure out how the same thing will be written in lightning. Here is my classic ...
0
votes
1answer
72 views

Writing test class for order activate. Error: Required fields are missing: [PricebookEntryId]: [PricebookEntryId]

I've written a test class for order update, though I am stuck at some minor issue which I am unable to get through. My test class looks like: @IsTest public class TestCreateMyOrder { static ...
0
votes
1answer
29 views

Update CustomField via Metadata API without including extraneous updates

as the title says, I'm working on a project to update the Description on the CustomField metadata type via the Metadata API and would like to figure out a way to do this without needing to read the ...
-1
votes
1answer
28 views

Whenever I update a account, if the account name contains 'test', it should be changed to 'test1'

Its working fine if the account name contains 'test' but if it contains 'TEST' or any other uppercase/lowercase combination other than 'test', its showing 'maximum trigger depth exceeded account ...
0
votes
1answer
36 views

Update isn't working on custom controller

I need to be able to update ONLY the website and BillingAddress fields. As of right now I can't get any of the fields to update. APEX: public class AccountTypeController { public Account ...
0
votes
1answer
39 views

Trying to write a trigger before delete on child to update a value in parent object

Here's what I have. Basically, if an opportunitylineitem is deleted, before it gets delete I need the probability field on opportunity to be set to 99. I can't seem to get it to work. What am I ...
1
vote
1answer
213 views

Can Not Update SFDX

I am running into an error when I am trying to update my SFDX version in my cli and I am unsure what it means. Olivias-MacBook-Pro:test op$ sfdx update › Warning: Use "npm update --global sfdx-...
0
votes
2answers
280 views

System.DmlException: Update failed. First exception on row 0 with id 0031t00000BrpLpAAJ; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY

Hello friends i was updating ownerId records firstly when i give 'limit 1' i could change but after i wanted to change 10 record system gave error message And i tell somethings about that am sending ...
-1
votes
1answer
93 views

Compile Error: static can only be used on methods of a top level type at line 8 column 18

The following is some code that was given to me to try but it has issues that I am having trouble with. With the code, I am trying to mark a checkbox = True, if the email address of a contact (any ...
0
votes
1answer
45 views

How to update the checkboxs dynamically in custom preference center page using AMPScript?

I have created one data extension using these fields 'name, email, checkbox1,checkbox2'. Also i created one custom profile center page like landing page using lookupRows function. My requirement is ...
1
vote
1answer
26 views

Cannot update lookup reference by External Id, if current reference is not null

Scenario: Product__c product = [SELECT Id, ProcurementGroup__r.Number__c FROM Product__c LIMIT 1] product.ProcurementGroup__r = new ProcurementGroup__c(ExternalId__c = '123'); update product; I am ...
0
votes
2answers
41 views

If I upgrade my sandbox, will the program disappear?

I will update Salesforce for the first time. If I update my sandbox after upgrading Salesforce, will ApexClass and LightningComponent disappear? What should I do to keep the program from ...
0
votes
1answer
94 views

Using AmpScript to update All Subscriber List

Here is my code that executes after a submit button is pressed on a cloudpage %%[UpsertData("SubscribersTester", 1, "Email Address", @subKey, "First Name", @Fname, "Last Name", @Lname, "Monthly"...
0
votes
4answers
59 views

Why does my trigger not update the record?

I have a trigger shown below that is supposed to count the related activities on a custom object and update a field on the record. trigger Call_Report_AfterUpdate on Call_Report__c (after update) { ...
0
votes
1answer
105 views

UpdateSingleSalesforceObject function is updating apparently several records

I am using this function to update one record in SalesCloud. I am experiencing a strange behavior: the function is updating several records. My code is retrieving one record, and then I am using the ...
0
votes
1answer
64 views

Execution of AfterUpdate caused by: System.QueryException: List has no rows for assignment to SObject () [duplicate]

Heres the error that I'm getting: Execution of AfterUpdate caused by: System.QueryException: List has no rows for assignment to SObject () I believe the issue is with the following lines, which aims ...
1
vote
1answer
93 views

How to Mass Update Records Without Changing the Last Modified By Field

I have a custom object that I need to do a mass update on to set a field on each to the same value. I had written a snippet of code to execute in the Developer Console that would get all the correct ...
0
votes
0answers
18 views

Unknown mass case updates?

I have had a few instances in the past couple months where my running user is doing mass updates to cases which changes the status to Closed. I have no idea what's causing it or where to even being ...
0
votes
0answers
30 views

Updating child records of a custom object with parent object's standard controller and extension to find related children

so I have a VF page in effect that grabs the child records (Child__c) from a parent record (Parent__c) to fulfill(remedy in this case) a mass update request for the child records of the parent. The ...
0
votes
1answer
20 views

How to handle failed updates when updating multiple Records in List

I have a Apex job that runs every night to change a field in multiple records. I've added some validations to the Object that are preventing some records from being saved. The problem is even tho ...
0
votes
1answer
42 views

Trigger is only updating one record per batch

I have a trigger that creates an AccountTeamMember object every time there is an update to an Account_Ownership__c object (this is a custom object that we've created in house to act more in line with ...
0
votes
2answers
58 views

Use trigger to prevent the System Administrator from editing a field, but still allow Apex code to edit it

My goal: to have a field on Account that is read-only for everyone (including System Administrator) but the field can still be edited by Apex code. For example, when an Opportunity is closed as won, ...
4
votes
1answer
65 views

Log says record has been updated, but it hasn't been

I have the following code: Administratie__c theAdmin = [SELECT Artikelen_laatst_bijgewerkt_op__c FROM Administratie__c LIMIT 1][0]; theAdmin.Artikelen_laatst_bijgewerkt_op__c = ...
0
votes
4answers
122 views

Salesforce Apex to update SFMC Subscriber status

I have to write apex code on salesforce service/sales cloud to update dynamic list of Subscribers status on Marketing cloud (SFMC), I will be having list of contactkey from marketing cloud (SOQL ...
0
votes
1answer
17 views

'ExceptionOfBeforeUpdate caused by System.finalException: Record is Read Only' on a BeforeUpdate

I am getting this error Record is Read Only on my Before Update trigger... I know you get that error on an After Update when you try and change something, but not a Before Update. trigger ...
1
vote
1answer
32 views

Design Pattern for Updating Records?

A while back I wrote an Apex class to handle opportunity splits. I couldn’t use the Opportunity Splits object because there were splits on three different corporate levels (with one-to-many or many-...
0
votes
2answers
156 views

Mass update through Flow - partial updated first 2 or 3 steps

I am using flow for number of mass update through list view and custom button. It was working since last year. User select set of records (less than 200) and click custom button. It will invoke flow ...
0
votes
0answers
24 views

Mass Update Report Filters

Our Salesforce org has over 700 publicly shared Opportunity reports that have one or more report filter referencing specific Stage Name(s). Our sales team has decided to rename all of the Opportunity ...
0
votes
1answer
218 views

Script Activity error in Automation Studio

I'm trying to run a Script Activity to update specific fields of a Lead in Salesforce (Marketing Cloud connector is already configured and working properly). Once I click on 'Validate Syntax' it ...
1
vote
2answers
177 views

Are objects from For Loops passed by reference or value?

If I have a for loop that loops through results from a database query, is the single record a reference or copied value? The reason I ask is because I am attempting to update these records, but would ...
0
votes
1answer
123 views

How to do a dependent callout from a future callout

How do I send a future callout to an external system inserting an parent object and as soon as I get the response back with an external id send another callout with a child object to an external ...
0
votes
1answer
28 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
77 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
452 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
39 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
65 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
80 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
645 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
66 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
102 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
45 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 ...