The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Please help me on how to achieve this

Vijay Kummamuru
Tera Contributor

 

 

 

Field NameField TypeComment
E-Wallet BalanceIntegerRead Only
E-Wallet Balance ValidityDate3 months later from the last E-Wallet balance added.
4 REPLIES 4

SN_Learn
Kilo Patron
Kilo Patron

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.

Create Custom Field 

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.

@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 

 

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.

Anand Kumar P
Giga Patron
Giga Patron

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