Function to update a record field if time is after hours.
Hi guys,
I'd like to know if someone could share a function script to update a "Yes or No" field called "Delay SMS" based on record created time on a custom module called "SMS".
I'd like to update "Delay SMS" to "Yes" when record is created before 11AM or after 6PM. And to "No" when the opposite happens.
Also, if record is created before 11AM, I'd like to update a Date/Time field called "Delay Date/Time" to 11AM on the same day. If the record is created after 6PM, then "Delay Date/Time" field should be updated to the next day at 11AM.
*This function will be executed via Workflows when a SMS record is created. I'm creating this records already via command center and Zoho Flow pushes this info to RingCentral. These 2 new fields will help me delay in ZFlow the creation of SMS in RingCentral.
Thank you all for reading and helping!
Rodrigo