+ Start a Discussion
FinneyFinney 

Field to become mandatory after saving the record

Hi

 

I have an object named viewing and I have 3 fields on it.

 

Start Time(Date/Time), End Time(Date/Time) and feedback notes(Text)

 

As soon as the user fills up the start time and end time and saves the record, then the Feedback notes field needs to become mandatory automatically. So if the user tries to edit the viewing, he needs to fill out the feedback notes for sure.

 

Can anyone please tell me how to do it.

 

Thanks

Finny

Alok_NagarroAlok_Nagarro

Hi,

 

The best way is validation rule.

matermortsmatermorts

Alok is right. Validation rule is simplest and most straight forward option.

 

So, it would probably look something like this (may have slight variations, depending on the names of your fields):

Start_Date__c != '' && End_Time__c != '' && Feedback_Notes__c = ''

abhishektandon2abhishektandon2

use a Validation rule use isblank(field_name)

 

AND(

NOT(ISBLANK(Start Time)),

NOT(ISBLANK(End Time)),

ISBLANK(notes)

)

 


 

 

 

 

FinneyFinney

Hi

 

I understood what you people said. Thanks for your help.

 

But the issue here is after I fill the Start Time and End time and save the record, it should be saved.

 

Then after, when I try to edit the record, I shouldn't be able to save it without filling the feedback notes.

 

According to the soultions given by you, if I fill the Start Time and Endtime and save the record, I am not able to save it without filling the feedback notes.

 

I hope I am clear on this.

 

Can you please help me on this.

 

Thanks

 

Finney

abhishektandon2abhishektandon2

Try to use isNew() funtion to check wheter the record is new and Ischanged funtion to check wheter the record has been updated in the current validation rule