If 'A' is a master object. 'B' is a child object.

A has some record types.

B also has some record types.

So my requirement is it should be like dynamically select Record Types based on master Record Types, i.e

whenever we select 'A', same record type of A should be given to its child 'B' dynamically. can u plz help me in this

  • My requirement is like, A is a master obejct. A has 2 record types s1 and s2. B is a child object where B has 2 record types s1 and s2. whenever we are creating a record in child object, same record type should get dynamically which is in master record.
    – Madhuri
    Sep 23, 2015 at 8:24
  • 1
    Master and child cannot get same record-type because record types are object specific. What you can do is define a mapping between record types of both parent and child. You can achieve this via a before insert/update trigger to fetch the record type of parent via query and then from the mapping, find out which record type to map it to.
    – manjit5190
    Sep 23, 2015 at 8:33
  • Thanq manjit.. will try through mapping
    – Madhuri
    Sep 23, 2015 at 8:50

1 Answer 1


Write a Trigger(before insert, before update) and based on parent record type name fill Recordtype in child record. to keep record of parent and recordType you can use map<ID,ID> one key is parent id and value is recordTypeName and second Map with key value pair of Parent RecordTypeName and child recordId and in processing get parent id from child and based on patrent recordTypeName set value in child record.

  • thanq tushar.. will try the trigger also if possible.
    – Madhuri
    Sep 23, 2015 at 8:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .