You need to sign in to do that
Don't have an account?
Avoid Duplicate Name Only on master in Master-Detail relationship
Hi,
I have two custom object Claim__c(master) and Labour_Cost__c(detail).
They have master detail relationship.
I want to create a Trigger which prevent duplicate Name(standard field which is created default when we create any custom object) only on master object.
but we can multipe record with same Name from detail object and we select it from lookup field (Claim_Name__c) on detail object.
plz write a trigger for same.
for example: I have a record on Master Object with Name='S1 Claim' .
if i create a new record with Name 'S1 Claim' then it will display an error 'record already exists with same name'.
But,I can create multiple record with Name 'S1 Claim' from detail object.
Thanks,
Ghulam
I have two custom object Claim__c(master) and Labour_Cost__c(detail).
They have master detail relationship.
I want to create a Trigger which prevent duplicate Name(standard field which is created default when we create any custom object) only on master object.
but we can multipe record with same Name from detail object and we select it from lookup field (Claim_Name__c) on detail object.
plz write a trigger for same.
for example: I have a record on Master Object with Name='S1 Claim' .
if i create a new record with Name 'S1 Claim' then it will display an error 'record already exists with same name'.
But,I can create multiple record with Name 'S1 Claim' from detail object.
Thanks,
Ghulam
All Answers
give me solution for same.. it means trigger avoid duplicate value only on master object but not in detail object.
thank you so much.... ts working very well.
Regards,
Ghulam
You can achieve the same functionality through customisation by using Duplicate Management.
Duplicate Management will support for both Standard and Custom Objects.
you can find at Setup --> Data.com Administration --> Duplicate Management
https://help.salesforce.com/HTViewHelpDoc?id=managing_duplicates_overview.htm
Thanks
Satya
thnx for ur respone... and its really good to do same.
regards,
Ghulam