Make field editable

Prasnajeet1
Giga Guru

Hi All

 

I have two requirements. 

1. "Last audit date" field should be editable for 3 role that is asset_manager, asset_admin & asset_analyst.

2. Update the "last audit date" with current date when asset is moved from any other state to "In stock".

 

For the 1st requirement I understood to write an ACL on alm_hardware table. But I have to write it in "Create" operation or "Write" Operation or I have to write it for both the operation. Please suggest.

 

For the 2nd operation I believe I have to write a BR with below script

current.last_audit_date = gs.nowDateTime();

But again, what should be the condition for the same. Please suggest.

3 REPLIES 3

POOJA SINGH18
Mega Guru

Hi @Prasnajeet1 

 

1. Yes, Write ACL will work for this requirement.

2. Before BR , on update and the condition will be "State" change to "In stock".

Also , before making this customization ensure there is no OOB functionality exits. 

 

Hope it helps and please mark helpful if it solves the issue.

Thanks,

Pooja Singh

 

Kartik Choudha1
Tera Guru

Hi

You have to write the Field level ACL. By field level means , you have the select the field 'Last audit date' while configuring the ACL on write operation.

 

For condition, use below one. Asset -> 'changes to' -> 'in stock' with 'Before' BR for insertion and updation

KartikChoudha1_0-1690891050321.png

 

Kalyani Jangam1
Mega Sage
Mega Sage

Hi @Prasnajeet1 

1)If you want to given role for "last audit field" then apply write acl for this field.

2) For Business rule
Before=>Insert and Update triggers on both time and condition like below

Screenshot 2023-08-01 at 5.31.13 PM.png

 

Please check and Mark Helpful and Correct if it really helps you.