You need to sign in to do that
Don't have an account?
Kamlesh
One-to-one relationship
Hi,
How can i create one-to-one relationship between two custom objects in salesforce.com.
Example: I have two custom objects having following details:
1) Employee (Name, PanCardNo)
2)PanCard(PanCardNo Name_on_card)
I have gone through documents of salesforce, but i can able to find out only lookup (One-to-many raltionship) and master-detail relationship(many-to-many relationship).
Is there any way to create one-to-one relationship??
Regards
kamlesh kumar
The last couple of posts were looking for reasoning behind the one-to-one relationship.
I have created a custom object "Source", which simply stores a "Unique Identifier" or GUID that is used from external systems. The other objects (i.e. Contacts, Accounts, Cases, othehr custom objects) have a Lookup relationship to this "Source". This is a scenario in which I would want to maintain a one-to-one relationship.
Yes, I could create a "Source" field on each object, but then this would require me searching each object that might contain the source field. And when working with the the API, we have to deal with the governors (limitations) in how we can query into the system.
So, hopefully trying to keep this conversation going to see if there are any ideas out there?
Thanks
Sorry, maybe it didn't fully explain the condition. I have multiple objects (i.e. Contact, Account, Case, etc.) that have a lookup to "Source". I want to ensure that one Source can only be assigned to one Contact ... or is only assigned to one Account.
I hope that explains it better.
This is a real let-down for me. I know it is requested on Ideas.
I've done it before using a lookup and related list, use roll up summary field and a validation rule saying that roll up summary field can't go above the value "1". Does anyone have a better solution?
It would be great to find a native solution. I know it can be done in Apex. Is this the best solution using native funcitonality?
Create a unique field on the child, and hide this field from all page-layouts
Write a workflow, for any change of the lookup field, to copy that value from the lookup field into the unique field
This process has many overheads:
Extra field is required
Unique criteria is utilized (we only get 3 unique fields per object)
Workflow is used
Another way to do is... create a master detail relationship and than on master create a roll up summary field of child with count. then you write validation on rule rollup summary field to check for >1 .. so it will give you error if it has more than one record for same master detail relation values..
one to one created...
http://one-to-one-salesforce.blogspot.in/
Suppose we lookup relation ship b/w two objects,then what type rule and evalution criteria we need to write....
if u know can u help me....
Thanks,
Hi SriRam,
Suppose we have lookup relation ship b/w two objects,then what type of rule and evalution criteria we need to write....
if u know can u help me....
Thanks,
We are trying to make opportunities a one-to-one relationship with contracts so that our reporting and workflows are more simplified. For example, we currently can not create a workflow that when an opportunity stage is set to "Closed Won" we would like our contracts to automatically activate. When we go to create this workflow, and set it on opporutnity (since thats where the trigger field is located) only opportunity and accounts is listed as an option.
Any ideas on how to make the opportunity to contract one-to-one so that we can have not only 1 contract related to 1 opportunity, but also to achieve the workflow listed above?
Any recommendations would be appreciated!
Step1: You can create Master details relation between on contract with Name as Opportunity.
Step2: Make Contract name as Unique by editing Contract name field.
Step3: Create a roll-up summary field on an opportunity with Summary Type as count.
Step4: Write validation rule on the roll-up summary field with count > 1 then through error.
Then you to make the opportunity to contract one-to-one so that we can have not only 1 contract related to 1 opportunity.
Thanks