function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Marco_MaltesiMarco_Maltesi 

Max records :2 /day !!

hello,

am creating a custom object .it  contain a mission progress report by day per employee.but the problem is that he can work in two missions in one day.

so i need to  avoid the duplicated records.(In max an employee can have 2 records in one day)

thanks for help.

Teach_me_howTeach_me_how

maybe a trigger on before update

 

query the owner id and created date of your object then validate if results is already equal to two dont allow to insert the current user entry.

 

let's wait for other if you asking for pseudocode.