Questions tagged [update]
An UPDATE statement changes the data of one or more records already existing in a table.
405
questions
0
votes
0
answers
42
views
Update by SOQL Query in Apex Trigger is not sticking
I am trying to update a field in the related Account using a apex trigger on the Contact. Here is the code -
trigger AvoidMerge on Contact (before delete) {
for(Contact contact: trigger.old){
...
0
votes
0
answers
22
views
Messaging Notification Flow action locks MessagingUser record?
We have a scheduled flow that has a Messaging Notification core action followed by an update to the Messaging Session and an update to the Messaging User.
The notification is received but while ...
-2
votes
1
answer
36
views
Method does not exist or incorrect signature: void updateaccHandler(List<Account>, Map<Id, Account>) from the type updateHandler [closed]
public class updateHandler {
public static void updateaccHandler(List<Account> upac, Map<Id, Account> mapaccmap){
for(Account acc : upac){
if(acc.phone != ...
1
vote
1
answer
68
views
trigger to update parent record without sub-query
suggestion required:
Below trigger updates a parent record (an Account) fields based on changes to its related child records (Opportunities).
The trigger works well and updates the parent record ...
0
votes
1
answer
51
views
I'm unable to select the Id of the related record within the Flow. However, I can choose other fields without any issues
I have a weird problem and don't know how to solve it, maybe I am blind. Please have a look:
I need to update a lookup field on the Account object. This lookup field is present on the current record ...
-1
votes
1
answer
51
views
Is there a way to know if LastModifiedDate field was change since the creation?
I have a requirements where I need to know if the record was never been updated since the creation. I tried comparing the lastModifiedDate or SystemModStamp and createdDate if equals, however they ...
0
votes
0
answers
15
views
Two Connection Names in CRMA Output
Has anyone experienced where there are two connection names in an output connector for an object? I'm specifically looking at the Opportunity Object in this case. Output connection name shows up as ...
0
votes
1
answer
56
views
Why is my trigger not updating the field?
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 ...
0
votes
0
answers
42
views
Update an Opportunity from a future callout method
I have a future method that posts data to an API, and IF the response2.getStatusCode() == 200, I would like to update a field on the opportunity. However, I get this error message:
System.DmlException:...
0
votes
1
answer
92
views
rollback partially in Service
When we are using Database.insert() or Database.update() with a false option(In any service) then it returns a success or failure result. We know in the insert if any lines fail, delete the header and ...
1
vote
1
answer
1k
views
LWC update Record field without Apex controller
I have an LWC Component and i am trying to update the field Images_Uploaded__c to true once the lightning input has finished the upload. I would like to do it in the component without having to modify ...
0
votes
1
answer
89
views
Is it safe to perform DMLs on related records in a `before delete` trigger?
I have two custom objects: Parent__c and Child__c. Parent__c has a field called ChildId__c which is a lookup on the Child__c object.
When a Child__c record is deleted, I need to check if its Id ...
0
votes
1
answer
224
views
Turning validations off for mass data update in sandbox [closed]
I do mass updates in sandbox and i dont want to trigger any automations or validations so is there a way (maybe using apex code) to turn off all validations and automations like flow,trigger,etc?
0
votes
1
answer
327
views
Inspector Update Data Unexpected Token
I am trying to insert the data from an excel sheet which I previously exported. I just merged two fields together. I keep getting the error message unexpected token. So I tried to not insert the whole ...
0
votes
1
answer
1k
views
How do I bulk update records using simple-salesforce?
I am successfully performing a bulk query operation using simple salesforce to obtain the Id's I want to work with, but when I perform a bulk update like this:
data=[{'Id': '1', 'Date__c': '12/01/2022'...
-1
votes
1
answer
160
views
How to get the previous value of record related field in validation rule?
I have a requirement to create a validation rule to check if the profile of the Case owner is same with the profile of the new case owner. If yes, allow to update the case owner. How can I achieve ...
0
votes
1
answer
174
views
How to make an empty DateTime field in an update trigger?
I want my DateTime field (Due_Date__c) in the custom object to be empty once I update the record. However, it's not changing to null when I update the record.
public class TestObject2Class {
public ...
2
votes
1
answer
152
views
Deserialized JSON with Invalid Ids are ignored silently
Below String has invalid Id for Lookup(Contact). But it's deserialized without an error, which I hope is okay. My concern is Update DML is run without any error and ignoring the invalid value instead ...
0
votes
0
answers
58
views
Any plans on moving to androidX on evergage interaction studio?
Interaction Studio(com.evergage.android:evergage-android-sdk:1.3.0) still uses com.android.support:support-annotations:28.0.0 and because of this I am unable to remove the jetifier. Any plans on ...
0
votes
1
answer
280
views
UpdateAsync(sobject) Method to update records in a (spawn) new transaction
The documentation says that data on the external system.
Asynchronous operation is used to process\update these records
Query
Does this mean I can update Sobjects (custom and\or standard) using this ...
0
votes
2
answers
214
views
Anonymous code for bulk update of text field
I have a text field named TestId in the object test which is capturing the Id of the record.Actually I have used an automation such as flow to update the value in the text field. Since I cannot make ...
1
vote
0
answers
137
views
Issue while capturing the approval comments of an approval process using a trigger
I have two approval processes in my org for an object Grant Contract Modification
first one being Grant Contract Mod Approval process and
the second one being FinanceApprovalProcessGrantContractMod.
...
0
votes
1
answer
33
views
VisualForce bug when updating a record in visualForce action
I have a visualForce page with an action that download the page. I need the pdf I download to show a field of my record, the problem is that all updates I do on my record in my function that the ...
0
votes
0
answers
224
views
Send a post request after an update
I'm trying to send a post request after an update from a record, and then is going to generate a link for the post request, I had the idea to create the post request after an insert using a trigger ...
2
votes
2
answers
933
views
Is it possible to only update one field?
Is it possible to only update one field?
List<Account> accountsFromSF = [SELECT Email_3__c from Account LIMIT 50];
for (Account acc : accountsFromSF){
acc.Email_3__c = '[email protected]';
}
...
0
votes
1
answer
380
views
Is it not possible to update a task with lead(whoid) and opportunity (whatid)?
As per document, i found that whoid can be lead/contact and whatid can be account/case/opportunity/custom obj and others. I am updating a task with leadid as whoid and opportunityid as whatid but ...
0
votes
0
answers
190
views
Apex - Very basic question about date/time
I have some basic questions about the date/time fields in Salesforce. I know Salesforce stores the date and time fields in GMT format in the object when a record is created or updated and also ...
0
votes
1
answer
985
views
Directly update triggering record in after save flow
I have a after saving flow and I am using update triggering record directly option to update the fields.
Is it good to have this option for after save flow for every decision like below? Because we ...
1
vote
0
answers
328
views
How to Update Records for lightning-datatable that have not been committed yet in a screen flow
I am using a lightning-datatable for flow screen navigation where by a user loops through a screen flow to generate objects that are stored in a collection variable that are actually inserted at the ...
0
votes
1
answer
2k
views
Strange error : INVALID_FIELD, All accounts must have the same current owner and new owner.: [OwnerId]
We have a scenario in which when a custom object owner gets updated we will cascade that to all accounts related to that object via a junction object.
Code is very simple.
if (!studentClassRoomList....
1
vote
1
answer
190
views
Swap 2 "Unique" values in a single transaction
Scenario:
"User" Object has a field "UNEQ" which is setup as Unique.
Object "ABC" is adjusted in an Enhanced List View, which causes "User" to be adjusted via ...
-1
votes
1
answer
28
views
Trigger getting Coverage on Insert but not Update
Why This Question is Necessary:
It is clear that this question get's asked quite a bit on here, but the examples in other questions are oversimplified (for example the post had a "redundancy"...
0
votes
1
answer
624
views
Trigger - Create new record and update lookup field with the related record
I have two objects which have a lookup relationship.
Object 1 - Task
Object 2 - Bonus__c
When a task is updated to 'Completed', I am creating a Bonus__c record.
How to update the lookup field on Task ...
0
votes
0
answers
170
views
How LastModifiedby (field) updated for true changes
I have a field named LastmodifiedBy that have a lookup with the objet User and it changes and takes the name of the user without making any changes or modification in my record , I just have to ...
0
votes
0
answers
993
views
Data Loader: csv file with records without ID, instead with External ID
I used the upsert function in Data Loader, but it created new records, not updated records. How can I update these records using an External ID instead of a Salesforce ID?
On the Lead object I have a ...
0
votes
1
answer
34
views
Need to update over 300 custom objects and disable "enableSearch"
I need to update about 350 custom objects and remove the flag for "enableSearch".
We do not want users to search these objects so they will not get confused with the primary data points.
I ...
0
votes
1
answer
5k
views
Update records using lwc
I have created an lwc component to enter the date picklist and text values and when I click save it gets recorded in the opportunity objects related fields.Right now I have created another object ...
0
votes
1
answer
3k
views
Write a trigger on Contact and fill its Mailing Address with its Account's Shipping Address
I am trying to write an trigger for when a contact get inserted or updated its mailing address so i want to copy this mailing address to its associated account's shipping address.
I am getting this ...
0
votes
0
answers
21
views
Why the whole trigger is not running for the 200 records [duplicate]
I have written a trigger In which I created a field Sequence Number on Contact to maintain its state in the update case but after after inserting more than 200 records for two accounts contacts then ...
1
vote
1
answer
266
views
How to update records which also are updated by by batch process
We currently have a batchprocess running from a managed package which runs every day for almost the whole day to update records of an object. When a user tries to do an update on this object we have a ...
0
votes
1
answer
89
views
After update Trigger to avoid hitting governor limits
We have a custom object(Request__c) with lookup to PersonAccount(AssigneeAccount__c) and Account(BusinessAccount__c) similar to AccountContactRelation(ACR) standard object. There is a requirement ...
1
vote
0
answers
60
views
update sobject class
I'm trying to update sobject from one to another sf org.
I import my custom wsdl sobjectEnterpriseSoapSforceCom and sobjectEnterpriseSoapSforceCom, i pass login but i cannot able to update an sobject.
...
0
votes
0
answers
83
views
BillingState Issue
i am trying to get BillingState value from apex trigger before insert, before update. I have troubles when change the value it got the last one and not the actual value
I do a debug and get the last ...
1
vote
0
answers
35
views
RDKit not working on Heroku
I want to deploy a Flask app on Heroku that uses the RDKit package. I installed it with the requirements.txt and it worked fine, but since the new version rdkit-pypi==2021.9.2 it doesn't work anymore. ...
0
votes
1
answer
698
views
Error: Compiled formula is too big to execute (5,254 characters). Maximum size is 5,000 characters Description Help Text
I Have 20 formula fields that calculate a number value based on picklist value selected multiplied by a value in custom metadata. I want to sum all these 20 fields based on changes of the picklist ...
0
votes
0
answers
41
views
Mass re-rerun / re-evaluation of related records
I have an object called Journey. Each record of this object is made of several Steps(object) and Sub-Steps(object).
To create a Journey record, I use a Template (Journey Template object).
When adding ...
0
votes
1
answer
982
views
Difference between Upsert and Update database methods
Good morning.
Database.update (fields , allOrNothing)
Database.upsert (fields, externalId, allOrNothing)
I need help to understand why the second parameter "externalId" is not necessary on ...
0
votes
1
answer
851
views
Rows.update data extension function
What is the error in this code:
<script runat="server" language="JavaScript" executioncontexttype="get">
Platform.Load("Core", "1.1");
...
0
votes
0
answers
2k
views
Updating the column and data of lightning-datatable on change of a combobox value in LWC
I have created a lightning datatable and have populated contact data in it.I am trying to update the column and data in datatable on change of a combobox.
The combobox has three options Lead, Contact, ...
1
vote
1
answer
1k
views
How to test trigger that compares Trigger.new with Trigger.old [duplicate]
I have a simple trigger that runs on Account update, and the only logic is a check to whether or now BillingPostalCode changes or not.
This is my code:
trigger ZipCodeUpdated on Account (before update)...