Creating Relations


1. One to one or look up relation: as explained in create new field section, you just need to create a field type as Look-up field. Once done you will be able to relate record in first object to some record in second object.
2. One-to-many: as explained in create new field section, you just need to create a master detail type field. In this case the second object becomes master and first one becomes detail object. A sub-section or subpanel will be created in second object displaying records in first object.
3. Many-to-many: there is no direct way in salesforce to define many-to-many relationship but this can be achieved by using junction objects. Junction object is nothing but two master details relations of two objects with a third object.
So e.g. if you want to relate object A and object B as many to many, you first need to
1. Create another object C
2. Create master detail relation for A and C.
3. Create master detail relation for B and C.
4. Once done a subpanel of C will be available for both A and B where you can create record having relation between A and B.

Comments

Popular posts from this blog

Field Level Security

Role Hierarchy

Start with salesforce