Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > Using the RelatedDocument feature in Extension

Forum

Search UsersRules
Using the RelatedDocument feature in Extension
#1
Just came
Points:: 0
Joined:: Aug 13, 2022

I want to use the Related Documents application, which has SSL feature, for the documents I generate from each other in the extension I created. Would you help me with this topic?

Profile
#2
Administrator
Points:: 0
Joined:: Oct 3, 2019

Hello Ertuğrul,

please specify which 1C configuration you are using? A typical one? Or a self-created one? And what version of SSL do you use?

Profile
#3
Just came
Points:: 0
Joined:: Aug 13, 2022

Hello Alexandr.
1C:Drive Turkey Sales And Services (1.5.2.2)
1C:Enterprise 8.3 (8.3.22.2283)

Actually, I seem to have completed most of the work, but I am getting some errors.

Filter criteria > RelatedDocuments
Filter criteria > SubordinateDocumentStructure
I added these to my extension config.

I set the Type and Content sections according to my own documents. and added the necessary events to the documents.

---For DocumentForm


Code
&AtServer
Procedure OnCreateAtServer(Cancel, StandardProcessing)
   // StandardSubsystems.AttachableCommands
   AttachableCommands.OnCreateAtServer(ThisObject);
   // End StandardSubsystems.AttachableCommands

EndProcedure

&AtClient
Procedure OnOpen(Cancel)
      // StandardSubsystems.AttachableCommands
   AttachableCommandsClient.StartCommandUpdate(ThisObject);
   // End StandardSubsystems.AttachableCommands
EndProcedure

&AtServer
Procedure OnWriteAtServer(Cancel, CurrentObject, WriteParameters)
   // StandardSubsystems.AttachableCommands
   AttachableCommandsClientServer.UpdateCommands(ThisObject, Object);
   // End StandardSubsystems.AttachableCommands
EndProcedure

&AtClient
Procedure AfterWrite(WriteParameters)
   // StandardSubsystems.AttachableCommands
   AttachableCommandsClient.AfterWrite(ThisObject, Object, WriteParameters);
   // End StandardSubsystems.AttachableCommands
EndProcedure


---------------For Document List Form

Code
&AtServer
Procedure OnCreateAtServer(Cancel, StandardProcessing)
   // StandardSubsystems.AttachableCommands
   AttachableCommands.OnCreateAtServer(ThisObject);
   // End StandardSubsystems.AttachableCommands

EndProcedure

&AtClient
Procedure OnOpen(Cancel)
      // StandardSubsystems.AttachableCommands
   AttachableCommandsClient.StartCommandUpdate(ThisObject);
   // End StandardSubsystems.AttachableCommands
EndProcedure


I also added these fields to the forms.



The errors I get are as follows.




In summary, I want to use the Related Document application in the extension documents I create within the Drive configuration.

Profile
#4
Just came
Points:: 0
Joined:: Aug 13, 2022

Thanks. problem solution.

When I added these codes into the forms, it worked.

Code
// StandardSubsystems.AttachableCommands
&AtClient
Procedure Attachable_ExecuteCommand(Command)
   AttachableCommandsClient.ExecuteCommand(ThisObject, Command, Items.List);
EndProcedure

&AtServer
Procedure Attachable_ExecuteCommandAtServer(Context, Result) Export
   AttachableCommands.ExecuteCommand(ThisObject, Context, Items.List, Result);
EndProcedure

&AtClient
Procedure Attachable_UpdateCommands()
   AttachableCommandsClientServer.UpdateCommands(ThisObject, Items.List);
EndProcedure
// End StandardSubsystems.AttachableCommands

Profile
#5
Administrator
Points:: 0
Joined:: Oct 3, 2019

Great!

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.