Please help me on how to achieve this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2024 10:34 PM
Field Name | Field Type | Comment |
E-Wallet Balance | Integer | Read Only |
E-Wallet Balance Validity | Date | 3 months later from the last E-Wallet balance added. |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2024 11:37 PM
Hi @Vijay Kummamuru ,
What is the exact issue that you are facing while creating those fields?
Take a look at the below link if you need assistance with creating new fields.
How to Add a New Field to a Form in ServiceNow
Mark this as Helpful / Accept the Solution if this helps
Mark this as Helpful / Accept the Solution if this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2024 11:41 PM
@SN_Learn i am not facing challange with field creation . i am not getting how to implement - 3 months later from the last E-Wallet balance added . can you check on this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2024 12:58 AM
Write a business rule with below condition:
after update
When to run: 'E-Wallet Balance' changes
Script:
var eWalletBalDate=new GlideDateTime(); //This will fetch the current date which also mean the same date on which the field(E-Wallet Balance) value is changing.
eWalletBalDate.addMonths(3); //Adding 3 months
var getEwalletBalance = eWalletBalDate.getDate();
current.<backend_name_of_ewallet_balance_validy> = getEwalletBalance;
Mark this as Helpful / Accept the Solution if this helps
Mark this as Helpful / Accept the Solution if this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2024 12:43 AM
Hi @Vijay Kummamuru ,
E-Wallet balance added date will store in date field so get the date and add 3 months and populate in E-Wallet Balance Validity field
Create Business rule with below script
var eWalletBalnceadded=current.datebalanceadded_field;
eWalletBalnceadded.addMonths(3);
current.ewalletbalalceValidityfield=eWalletBalnceadded;
Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand