Reposting document which is created on base of another document

The 1C:Enterprise developers forum

#1
People who like this:0Yes/0No
Active user
Rating: 6
Joined: Sep 16, 2011
Company:

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?

 
#2
People who like this:0Yes/0No
Active user
Rating: 4
Joined: Apr 18, 2012
Company:

Code
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

 
#3
People who like this:0Yes/0No
Active user
Rating: 6
Joined: Sep 16, 2011
Company:

Thank you, alexht!

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.