New answers tagged

0

That's right Ayush, in the criteria within the Action itself, you cannot select fields on related objects. Either put the Account owner email criterion in the diamond criteria node, or add a custom field to your object which gets the Account owner email.


2

As Kris is saying, you should be looking to the processes, workflows and any other declarative operation that may be firing on the same transaction. You can also try a couple of things to see if you can control a bit the transactions that are operating on this classes. I will suggest to make a clear cut between before update and before insert operation. ...


4

Since you're new to Salesforce, I'd recommend that you ditch this approach. It's highly inefficient and manual. Instead, you can use BusinessHours and Custom Metadata to provide a configurable setting for your trigger. BusinessHours In Setup, create a new Business Hours setting. You can just specify the start and end times as 12:00AM on each end to make ...


0

If there is no relationship between the objects then this is not possible to achieve. The workflow can only update the same record or the Master record. no other record can be manipulated using just workflow.


4

I was able to update the UnitPrice by first removing all its related OpportunityLineItemSchedule records, the code as follows: Id oliId = '00k1w000006SpWE'; List<OpportunityLineItemSchedule> olisList = [SELECT Id FROM OpportunityLineItemSchedule WHERE OpportunityLineItemId = :oliId]; delete olisList; OpportunityLineItem oli = [SELECT Id, UnitPrice ...


Top 50 recent answers are included