Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > Reposting document which is created on base of another document

Forum

Search UsersRules
Reposting document which is created on base of another document
#1
Active user
Points:: 2
Joined:: Sep 16, 2011

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?

Profile
#2
Active user
Points:: 0
Joined:: Apr 18, 2012

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

Profile
#3
Active user
Points:: 2
Joined:: Sep 16, 2011

Thank you, alexht!

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.