Thanks a lot for responding but this code seems to only copy the child table into the current doc from another doctype. What I am trying to do is to copy the child table from the current doc into a new document
It seems strange to me that there’s no straightforward way of pushing the child table while fields on the parent doc are getting pushed without any issues? Why can’t child table fields be conveyed in the same payload? Is this a design problem?
In any case, thanks again for your response. Based on your comments, I solved the issue by pulling on the New Doc side (using refresh trigger). Still think it should be a more straightforward process though
Thank you for the wonderful contribution.
Through your code, I was able to do the same.
My requirement was exactly reverse of yours, but still the code helped very much.
It took some trial an error and I succeeded.