New answers tagged

0 votes
Accepted

apex date not valid error

I'd recommend you avoid Date.parse. You may get random errors depending on the user's locale, given the fixed format of this input. Aside from that, unless you want to do your own calculations, I'd ...
user avatar
  • 433k
0 votes

How to set a Date in apex test class?

Another option is using system.today().addDays(10) acc.effectiveDate__c = System.today().addDays(10);
user avatar
1 vote
Accepted

Changed Date in flow

You can use $Record__Prior global flow variable, in order to get original value before change. create a formula, which will return value, which should be set IF($Record__Prior.DateField__c < TODAY()...
user avatar
0 votes

Changed Date in flow

You may be able to create a custom formula field on your record with the value: checkbox. This would not require a flow. The formula you use for this field could be: IF(DateField__c>TODAY(), true, ...
user avatar

Top 50 recent answers are included