Questions tagged [update]
An UPDATE statement changes the data of one or more records already existing in a table.
414
questions
-3
votes
0
answers
39
views
What is the reason for the PATCH request to update HTML content in the SFMC is not working in Postman when updated using content as a variable
When I add actual HTML content in place of variable the Email Asset gets updated, Is there any workaround for this.
0
votes
0
answers
16
views
Update Contact doesn't update the contact that in the journey
Currently, I have a journey setup like in the pic. I submit new data to Journey03Users data extension via API and trigger email sending. I hope that when the user opens the received mail, it will ...
0
votes
2
answers
89
views
Is there a way to refresh a record after an autolaunched flow is executed?
I have a flow which is launched by a custom button in a record page. When the button is pressed it makes a field update. The problem is that after pressing it you can't see the update, but it's done (...
0
votes
2
answers
37
views
Issue with attempting update to System.AccessLevel.USER_MODE -- Cannot specify both an external ID reference Owner and a salesforce id, OwnerId: []
I'm trying some of the new features to Apex to automatically apply User Access. I cannot get an update to work that worked from with a require "update" or "Database.update()".
...
0
votes
1
answer
28
views
Correct syntax to reference dynamic column name with SSJS Rows.Update() function
When the column name of a Data Extension is unknown and data needs to be written to that column what is the correct syntax as the following do not seem to work,
Where e.num is some dynamic value like ...
1
vote
0
answers
55
views
Error after securing update dml: INVALID_FIELD, Cannot specify both an external ID reference fieldxyz__r and a Salesforce id, fieldxyz__c
I retrieve a record with SOQL:
Asset assetRecord = [SELECT Id, fieldxyz__c, fieldxyz__r.Name FROM Asset WHERE Id = :someId WITH USER_MODE LIMIT 1];
At some point, I update this record and it works:
...
0
votes
1
answer
46
views
Field not being written to in helper class
I am trying to schedule a batch job, take the Id of said batch job and then write it to a field on the triggering record.The scheduling works successfully, it just doesn't write to the record.
Trigger ...
0
votes
0
answers
38
views
contact support: 899783842-5044 (859856306) [duplicate]
opportunity update code was working fine, suddenly started getting error
"UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 899783842-5044 (...
0
votes
0
answers
49
views
Trigger on OLI update seems to fire twice
I am trying to send an email notification if an opportunitylineitem field has changed.
For this i created a trigger and it works well BUT it sends 2 emails and i don't understand why. Obviously one is ...
0
votes
1
answer
44
views
For update operation,average amount is not updating in apex trigger
Trigger scenario:
𝐖𝐫𝐢𝐭𝐞 𝐚𝐧 𝐀𝐩𝐞𝐱 𝐭𝐫𝐢𝐠𝐠𝐞𝐫 𝐭𝐡𝐚𝐭 𝐜𝐚𝐥𝐜𝐮𝐥𝐚𝐭𝐞𝐬 𝐭𝐡𝐞 𝐚𝐯𝐞𝐫𝐚𝐠𝐞 𝐨𝐟 𝐚𝐥𝐥 𝐫𝐞𝐥𝐚𝐭𝐞𝐝 𝐎𝐩𝐩𝐨𝐫𝐭𝐮𝐧𝐢𝐭𝐲 𝐀𝐦𝐨𝐮𝐧𝐭𝐬 𝐚𝐧𝐝
𝐮𝐩𝐝𝐚𝐭𝐞𝐬 𝐚 �...
0
votes
0
answers
17
views
Sort Element - Can it work with/as a variable from GET to UPDATE
Situation. We are tidying up some flows so they use less GET's.
We have one that gets a single highest value of the last 6 months.
Previously we had a filter (for its requirements) then a descending ...
0
votes
1
answer
65
views
Add/Increment a value to the target data extension field of a query activity in Marketing Cloud
I have a Data Extension with daily sendLogs and I want to get the client_id with the EmailID=XXXX and ActivityId = XXXXXXXXX and add 1 to the field N_Ciclos of "Contadores" DE (target DE).
I ...
0
votes
2
answers
116
views
How do you block a user from updating a particular field while allowing a flow to do so?
I need to allow a flow to update a record status to a particular stage, while users are prevented from doing so.
My problem is that if I set a validation rule to prevent users to update a record ...
1
vote
1
answer
267
views
Flow Bulkification with respect to duplicate Update Records on the same parent record
I'm designing a flow to roll up values to a parent record, and although I've reviewed the documentation here on bulkification, there is a piece that I haven't quite figured out.
The flow will run upon ...
0
votes
0
answers
117
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
223
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 ...
1
vote
1
answer
143
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
558
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
759
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
1
answer
79
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
1
answer
231
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
5k
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
279
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
610
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
2
answers
1k
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
3k
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
394
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
228
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
253
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
1
answer
511
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
492
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
168
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
41
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
303
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
1k
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
647
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
226
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
2k
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
487
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 ...
1
vote
1
answer
4k
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
231
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
731
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
254
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
1k
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
42
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
6k
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 ...
1
vote
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
22
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
409
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 ...