You need to sign in to do that
Don't have an account?
Kamatchi Devi Sargunanathan
Need help to prevent two numbers overlapping between records of an object..Urgent Please Help
Hi All,
I have a requirement to avoid overlapping the two number field values with in an object records creation/updation. Following are my Scenarios for preventing overlapping between records,
From the above table the two values indicate the minimum and maximum ranges. There we can add a new record with MinRange__c = 101 and MaxRange__c = 200, because didn't overlap any of the other record's min and max value.
But we should not allow the values MinRange__c = 10 & MaxRange__c = 70 or MinRange__c = 201 & MaxRange__c = 250 and so on, because it will fall under already created records min and max value(Overlaps).
If you see the last row, this has the -1 value as maxrange__c because this is used to indicate the infinity. It this is found in a record, we shouldn't allow another record should be created with MinRange__c > 500
Please anybody help me with a solution for this logic.
Thanks in Advance,
Kamatchi Devi R
I have a requirement to avoid overlapping the two number field values with in an object records creation/updation. Following are my Scenarios for preventing overlapping between records,
From the above table the two values indicate the minimum and maximum ranges. There we can add a new record with MinRange__c = 101 and MaxRange__c = 200, because didn't overlap any of the other record's min and max value.
But we should not allow the values MinRange__c = 10 & MaxRange__c = 70 or MinRange__c = 201 & MaxRange__c = 250 and so on, because it will fall under already created records min and max value(Overlaps).
If you see the last row, this has the -1 value as maxrange__c because this is used to indicate the infinity. It this is found in a record, we shouldn't allow another record should be created with MinRange__c > 500
Please anybody help me with a solution for this logic.
Thanks in Advance,
Kamatchi Devi R
I know we could do this only using trigger. But I have been trying to acheive this logic using trigger for two more days, but till this is locking in a part i couldn't do this perfect since.
So, If anybody try this and achieve this logic in trigger, please send me the code.
Thanks.
Let me know if if you are still facing this issue, I could help you write trigger.