So I have a weird requirement to fullfill in our CRM System.
In our env we have entity lets say "Job" and it has three fields.
- Job Number (SLT field)
- Task Number (SLT field)
- Account(Lookup field)
Requirement:- Restrict user to create a Job record if there exist a record with same job number and Task number field is empty. If a Job Code along with a Task Code is entered, only one of these combinations should be allowed. The same Job Code / Task Code combination can only be entered once.
Example-
Existed Record:-
Record 1:-
- Job Number-J1
- Task Number -T1
Record 2:-
- Job Number-J2
- Task Number -Empty
Input:-
Scenario 1:-
- Job Number-J1
- Task Number -T1
Not Allowed
Scenario 2:-
- Job Number-J1
- Task Number -T2
Allowed
Scenario 3:-
- Job Number-J2
- Task Number -Empty
Not Allowed
Any help would be really appreciated.
Thanks and Regards
Naveen