+ Start a Discussion
maxout2maxout2 

Parent ID is null when creating child object through related list

Parent ID is null when creating child object through related list if the parent id field isn't in the child's layout.

Does it make sense.

*werewolf**werewolf*

Yes, that's how it works.  When you press a New button from a related list, it's really just opening a new child object screen and defaulting the values of certain fields (in this case the lookup field).  If those fields are missing, then the relationship will not be created.

Bhawani SharmaBhawani Sharma

Here is the reason:

When you click on new button of a child , it pass the parent Id value in the URL and redirected on the child creation screen. Where it tries to populate the parent value on the screen using the field id from the request parameter, but as your parent field is not on the screen this value will not be set and remain Null.