Questions tagged [field-update]

Field updates within Salesforce allow the user to automatically specify a field value.

Filter by
Sorted by
Tagged with
11
votes
3answers
3k views

Avoiding use of future calls in triggers?

I have some code I'd like to change in a trigger. The issue is that there is a field that is being updated with a prefix plus the value of a field in the object that is an automatic number. The ...
10
votes
3answers
30k views

How do I mass update my object?

I have created a new number field within my Opportunities object which is set to required and has a default value (0), however this is causing issues with closed Opportunities that did not have the ...
7
votes
1answer
9k views

Trigger behavior with Field Update

Well today while working with triggers I observed a weird issue. In my org I have a object called Demo__c and which has a standard "Name" field and another field called "TimeStamp__c". I have a ...
7
votes
2answers
971 views

Campaign to contact record record field update

Is there a way to trigger a field update such that when the information about a campaign member is modified in the campaign object, it updates a field of the same member's contact record?
7
votes
2answers
11k views

How do I mass update existing records after adding a new custom field?

I added a new custom field to an object with many existing records. It was a checkbox field and during creation I specified the default value to be "true". However, it looks like all the records have ...
7
votes
1answer
585 views

Optimistic locking when working via REST API

I have a case when SF data can be updated concurrently by humans with UI and by a Ruby app via REST API, so I'm worried about the possibility they overwrite changes of each other. Is there a standard ...
6
votes
5answers
2k views

Best practice for removing former admin user from all records, triggers and workflows?

I'm thinking of using demandtools to find all objects that their account is tied to. Then I was going to test removal and replacement with current admin user in a sandbox environment. Just wondering ...
6
votes
1answer
5k views

“Expression cannot be assigned at line -1 column -1”

I'm trying to write an Apex trigger that makes a field on the Contact called Meeting Date equal to the Meeting Date field on the Opportunity. For some reason I'm getting an error saying "Expression ...
6
votes
1answer
4k views

Before Insert Trigger not updating field

I have a before insert trigger to update a custom field on the Contact object, Region__c. Debugging confirms that the field is set to the correct value on the sObject, but both the test asserting the ...
6
votes
2answers
2k views

Text field to Picklist

Is it possible to push the value of a text field into a picklist without using a trigger in salesforce?
6
votes
2answers
3k views

The approval process references the workflow action FieldUpdate Some_Field_Update, which doesn't exist for the Some_Custom_Object__c object

While trying to deploy an approval process with the Salesforce Migration Tool, I get the following error: The approval process references the workflow action FieldUpdate Some_Field_Update, which ...
5
votes
1answer
3k views

How do processes consume SOQL queries?

I'm currently using processes to update records. The ills describing of using the process builder are known to me, but I need more information on how 'Update Record actions' in a process are bulkified....
5
votes
1answer
517 views

Why does this formula not evaluate to true?

I have a time based workflow but the criteria I have set up is not being evaluated to true even though the results are the value that I believe them to be. Here is the debug log showing the workflow ...
5
votes
1answer
2k views

Invalid field OwnerID for SObject

I'm attempting to upsert a record to a custom object named Contact__c, I'm getting a compile error "Invalid field OwnerID for SObject Contact__c" Here's the code: if(vault_key != null) { ...
5
votes
1answer
151 views

Looking for declarative approach to updating a field on a child record basd on a value from the parent record

I am racking my brain on the best way to solve for this seemingly easy issue. First let me set the stage a bit: I have custom objects called 'Demand' and 'Release'. Each demand is associated to a ...
5
votes
1answer
238 views

Is the order of update calls within one batch guaranteed?

We have an external application integrated with Salesforce that sends account information to Salesforce using the Soap API call upsert(), including status information. We have the problem that changes ...
5
votes
1answer
2k views

Update on any record update

I would like to know is it possible to send out a notification whenever a record is edited. I want the trigger to fire on any field change - I have about 10-15 field so I prefer not to create ...
4
votes
2answers
6k views

How to update picklist using REST API

Would anyone have an example on how to update a picklist? I have a System Custom Field that I want to append add new items to as it comes up. The details of the field are the following: Field Label:...
4
votes
3answers
12k views

Date Formula to Calculate date excluding weekends

I have a formula that is calculating the date from another date field + number of days and returning a date. test census dates field = Confirmed_Enrolled_Date__c + 16 I want to exclude weekends ...
4
votes
2answers
993 views

Convert Trigger to use Dynamic Apex

I want to convert my below trigger to use Dynamic Apex, so that I can avoid code repetition for other objects. This is what my trigger does :- I have a object called Incident__c and a custom field ...
4
votes
1answer
3k views

How to get parent data in a before insert context?

I have several Workflow Rules + Field Updates in my QuoteLineItem object. This is not working well, since there is too much logic in Field Updates and I do not have full control on execution order, so ...
4
votes
3answers
1k views

Dynamically get result of a VF field's formula, using Apex

How can I get the result of a formula ("field update"/"workflow rule"), in Apex, without hard-coding it? There is a field whose value (calculated on upsert) is the formula result. I have dismissed ...
4
votes
1answer
10k views

How to update a field with Lightning Components?

Following the "expense" example in the documentation, I'm trying implement an even simpler Lightning Component just to query and update just the single field Account.Name - query and display works ...
4
votes
1answer
2k views

Calculating date/time x working hours from now

I need to trigger an email notification 9 working hours after a particular field is changed in Salesforce. So if the field is changed on a Friday at 4pm, I need to calculate now() + 7 hours + an extra ...
4
votes
2answers
10k views

Trigger to update Account field when update is made to Custom object

Hi i could use a little help and i'm totally stuck. I'm trying to write a trigger to update a custom field on my Account object when a update is made on a field in my custom object. The object is ...
4
votes
1answer
2k views

Time-based Workflow not triggering

I've been working on testing a time based workflow, that fires off an email 1 and 3 hours after a new contact is created. Of course, this is small scale testing, as I would eventually like to ...
4
votes
1answer
1k views

after update trigger creates duplicate value to related list if related list is empty

I am trying to create a trigger that would add a new value to a related list if a value is adeded to a field. The field is called Reason of Contact (ROC) and when ever a new reason of contact is ...
4
votes
1answer
201 views

I would like to auto update a field using parsed data from another?

I am trying to either set up a field that will auto populate with parsed data from another or a workflow to accomplish the same. I have text field of Field1_C with data 12345D. I would like to pull ...
3
votes
3answers
1k views

Updating 50 checkboxes on picklist change with Trigger?

One of our objects has about 50 checkboxes. I've been asked to create a picklist that allows a user to "Check All" or "Uncheck All" of the checkboxes. My first thought was a workflow rule, but ...
3
votes
2answers
779 views

Update a Parent object with field values from the Grandparent

I am attempting to update the parent of a newly created object with fields from grandparent of the object. Does anybody have an answr to this ? I'm currently trying to convert this code into this. As ...
3
votes
4answers
1k views

How to set a value multiple times within same update

I have a batch process that updates a bunch of currency fields on a parent record based on the month of a child record. It works great and runs every hour to find new records and update the parent ...
3
votes
1answer
12k views

Too many DML rows: 10001(bulk update)

when I try to run the code below I am getting this error: 'Too many DML rows: 10001'. The object that I am trying to update is one of the main object in the org. so it has multiples triggers, ...
3
votes
3answers
2k views

Is Batch APEX the only way to execute an Apex class

I need to loop over a bunch of records from a custom object and set a value on a new field. I expect the total number of records at about 1000-1200 only. Is batch apex the only way to do this? I ...
3
votes
2answers
446 views

How would you use Schema.SObjectField to dynamically get the values of each field for the object?

Basically, we have this object: Animal. And Animal has a few fields, Number_Of_Legs, Warm_Or_Cold_Blooded, etc and I basically want to automatically map the names and corresponding values into a map. ...
3
votes
2answers
761 views

Fire Journey Builder when Contact Object is Updated

In Journey Builder where the Entry Object is Contact, i have setup event criteria to fire journey upon Creation or Updating a Contact. But once activated, the journey only fires up when a Contact is ...
3
votes
1answer
1k views

priorvalue is blank or --None— update internal status “In-progress” workflow

created workflow criteria is created and everytime edited but it's not working if priorvalue of internal status is blank or --None-- and record is not isNew() then update internal status picklist is "...
3
votes
1answer
1k views

Field Updates in Workflows

I have a workflow that has three field updates. I would like to know if these occur in sequential order. If I can guarantee they do occur in the order I have set out I can accomplish my use case ...
3
votes
1answer
688 views

How can I update a text field on a child object with a value from it's parent without using a formula field?

I have an object with a lookup relationship to Account (so it just stores the Id), but I need the account name to be searchable in the lookup dialog for finding Since you can't search on formula ...
3
votes
2answers
154 views

Workflow Rule Execution criteria

I have 4 WF rule which are firing on different criteria. The criteria is like 1 WF will fire on Stage1, 2nd WF will fire on Stage2, 3rd WF will fire on Stage3 4th WF will fire on Stage4. 1st WF ...
3
votes
1answer
99 views

Update check box using workflow

I have created a workflow and I need to update a check box based on other field If checkbox1------>is true then need to update chekbox2 as true If checkbox1 ------> is false then need to update ...
3
votes
2answers
1k views

New Workflow Rule with Existing Field Update for ChangeSet

I'm creating a New Workflow Rules with existing field update, do I need to include the existing field update in ChangeSet?
3
votes
2answers
943 views

Added Auto-Number field in Managed Package - How to generate values for existing records in upgraded orgs?

I have a managed app installed in multiple orgs. This app contains CustomObject__c. All org where my app is installed have many records of that type. Now I push upgraded this app and added a new Auto-...
3
votes
3answers
1k views

How to read lightning:recordEditForm Object instead of using API

I got 3 lightning:recordEditForm components on a wizard (3 pages handled by slds-hide/show) to capture details. At the last wizard page it must save first object, and 2nd object must get first object'...
3
votes
1answer
59 views

I want to change the record type of contact if 6 months has passed since 'last communication date'

i have written a workflow rule that will Evaluate the rule when a record is created, and any time it's edited to subsequently meet criteria, which eventually will change record type of contact. Rule ...
3
votes
2answers
2k views

Field Update Trigger - Why is the field not updating?

I'm trying to create a trigger that updates a field on a contact whenever the contact changes ownership. The trigger saves without error, and my test class for the trigger gives a 100% code coverage ...
3
votes
1answer
445 views

Changing a Case Insensitive field in Managed Package

I have a "Dupe Detector" field in a couple of objects that is Unique (Case Insensitive). It is a Text(255) whose value is updated by a Workflow Field Update. We have recently had the problem that ...
3
votes
1answer
2k views

Trigger a workflow using another workflow

I am currently using two workflows to check if a record has been updated or not on a daily basis. The first workflow has the following logic : (If RecordName equals 'RECORDNAME' , AND If Status ...
3
votes
1answer
2k views

Approval process step field update doesn't appear in same step's Visualforce email template?

Two step approval process on custom object Foo__c initial value of Foo__c.Status__c is 'Submitted' Approval Step 1 actions are threefold: Field update on Foo__c.status__c = 'Step 1 approved' Text ...
3
votes
2answers
743 views

Validation rule to pass a Value to a text field by validating another text field

I am having two textfields consider A and B. When i enter a value for B, the corresponding value should be passed in Field A. FOR EXAMPLE : Field A is Dependant on Field B Values IF Field A IS ...
3
votes
3answers
6k views

Mass update Knowledge Articles with Data Categories

Is there any possible way to update an existing set of knowledge articles to include specific data categories without manually going into each one? Can this be achieved with data Loader?

1
2 3 4 5
9