function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Marcela SanchezMarcela Sanchez 

Update a date from a login flow?

In the object Opportunities there's a field named Expected Order Month.
If the date in that field has expired, I want to make a login flow that doesn't let the user do other thing if he doesn't set a new date.
 
Best Answer chosen by Marcela Sanchez
John Pipkin 14John Pipkin 14
Marcela, 

You would need to create a validation rule on the opportunity. Login flows are only for when a user logs into salesforce for additional authentication. They are not used for business processes. 

The validation rule would look like this:
Expected_Order_Month__c < today() && NOT(ISBLANK(Expected_Order_Month__c))

 

All Answers

John Pipkin 14John Pipkin 14
Marcela, 

You would need to create a validation rule on the opportunity. Login flows are only for when a user logs into salesforce for additional authentication. They are not used for business processes. 

The validation rule would look like this:
Expected_Order_Month__c < today() && NOT(ISBLANK(Expected_Order_Month__c))

 
This was selected as the best answer
Marcela SanchezMarcela Sanchez
Ok, that's what I wanted to know. I was breaking my head with the flows.
Thank you.