function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sonamsonam 

Parent account id is coming null in child accounts list .

I am creating a dummy parent account and list of child accounts in my test class which are referring to the parent account . Test class is written on an account insert trigger operation . But whenever the list of child accounts is inserted , value of parent id is coming null and the feilds of parent are also not populated on child ... Can any one tell why parent id is coming null or how to assign a parent account id to child account .
Thanks in advance ... :)
Subramani_SFDCSubramani_SFDC
Can you post ur code here??

objects created in Test class is purely temp purpose. These are not storing in database.That may be the one of the reason.
For a master-detail relationship that means you will first need to create and insert the master record and then create and insert a child record for it

if my answer helps your pbm , pls choose best answer to make others use this solution


Regards
subra