Can i update child document while update parent document from script

can i update special document while update a document?
For example: i have 2 docs, doc parent A and doc child B. whenever i update doc child B, i want filed a1 of doc A have value v1.
is it possible? cause as i know 1 script can only apply on 1 document at the same time :((

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.