- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2022 04:13 AM
i have teo fields in the request form. 1. Approval
2. Approval date
if we change the Approval field value as Approved, Approval date field need to display the date.
ex: if we change approval field value as approval today, approval date field need to display today date.
similar to we we change the approval field value to approval after 2 days, approval date field need to display on that date.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2022 04:31 AM
Hey Siva,
The business rule solution is the quickest possible way to achieve the requirement.
In case you need it via client script, you can try using the solution provided by SnowLearns below.
please mark my solution as helpful if it somehow helped you reach your solution or to enhance your understanding.
Thanks,
Shreya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2022 06:19 AM
Hi Siva,
You can put a condition using a Business Rule wherein as soon as the state ChangesTo Approved, the Approval Date is updated by today's date or the date when the state changes which you can get using gs.now() or if it's a date/time type field; it can be fetched using gs.nowDateTime().
NOTE: gs.nowDateTime() function is not available in scoped applications.
Thanks,
Shreya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2022 06:27 AM
@Shreya Kaushik1 it is only date type field.
could you please help me with the script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2022 06:43 AM
Hi Siva,
I have tried replicating your scenario with incident table, as below:
Created a Before Update BR with condition State Changes to In progress (you can customize the conditions based on your state field and value)
In the Actions tab on the Business Rule, configure as below:
The results were something like this:
Please let me know if you face any challenges.
Please mark the answer helpful if it solves your purpose.
Thanks,
Shreya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2022 07:16 AM
thanks for help. @Shreya Kaushik1
could you please elaborate how you have written gavascript:gs.now();