The 1C:Enterprise developers forum
I have two documents and one is created on base of the other. When the base document is reposted the one which is created on base of it should be reposted too. How can I implement this?
Procedure Posting(Cancel, PostingMode) Query = New Query; Query.Text = "SELECT | SecondDoc.Ref |FROM | Document.SecondDoc AS SecondDoc |WHERE | SecondDoc.BaseDoc = &Ref"; Query.SetParameter("Ref", Ref); ResultSelection = Query.Execute().Choose(); While ResultSelection.Next() Do DocObject = ResultSelection.Ref.GetObject(); DocObject.Write(DocumentWriteMode.Posting); EndDo; EndProcedure
Thank you, alexht!