You need to sign in to do that
Don't have an account?
sfdcdude
friday date
If user enters a Weekend (Saturday, or sunday) date in field A, I would like to see the fridays date in B field. And My field A datatype is datetime not Date. Please guide me or post your answer please. Thank you.
create a formula for this requirment.
If you want to make populate friday's date then you will have to create deal_report__c as a formula.
and if user select Submit_deal_datetime__c apart of weekend(Saturday, or sunday), it will return null.
let me know if it helps you and marking it as best answer.
Thank you
All Answers
Can you elaborate on the scenario you want to implement and the issue you are facing to check further and respond.
Thanks.
Hi Pradeep,
Please find the solution.
Please let me know it is working or not?
Please mark it as the Best Answer if it helps you.
Thank You
To elaborate more, I am having a datetime field called (Submit_deal_datetime__c). When user selects a date (Lets say, weekend date (06/12/2021) or (06/13/2021) which falls under saturday and sunday respectively), then in another field called (submit deal_report__c) should populate firday'date( 06/11/2021). Please let me know if you are clear. Else will connect and solve this.
Thanks,
Pradeep. P
Please let me know it is working or not?
Please mark it as the Best Answer .
Thank You
if you want to print friday date in 06/11/2021 then use the above code.
don't forget to mark Best Answer
Thank you
>> https://developer.salesforce.com/forums/?id=9062I000000g6DAQAY
Using the snippet mentioned you can modify it to make sure that any new record entered or updated if the selected date is lying on Saturday or Sunday you can use adddays function to modify date accordingly.
Let me know if it helps you and close your query by marking it as the best answer so that it can help others in the future.
Thanks.
Thank you. Your logic is working for weekend perfectly. Sorry that I have missed one scenario to explain you.
Another scenario is, If it is a weekday then same date should be printed in (ac.Description). In my case i am using this field as a date field.
could you please add this logic aswell. so that will close this answer as a best answer. Thank you.
Be happy
create a formula for this requirment.
If you want to make populate friday's date then you will have to create deal_report__c as a formula.
and if user select Submit_deal_datetime__c apart of weekend(Saturday, or sunday), it will return null.
let me know if it helps you and marking it as best answer.
Thank you