Dear Mesut,
in 1C extensions, the input mechanism based on (when a new document is filled with data from another, previously entered document) is implemented differently, not like in the main program.
First, you need to create a new general command in the extension (please see screen 1).
To process this command, create the following code:
Code |
---|
&AtClient
Procedure CommandProcessing(CommandParameter, CommandExecuteParameters)
// Insert handler content.
refSepetleme = New Structure("Ref", CommandParameter);
FormParameters = New Structure("FillingValues", refSepetleme);
OpenForm("Document.AsidikYağ_Alma.ObjectForm", FormParameters, CommandExecuteParameters.Source, CommandExecuteParameters.Uniqueness, CommandExecuteParameters.Window, CommandExecuteParameters.URL);
EndProcedure |
and in the document module "AsidikYağ_Alma" - this is the filling procedure:
Code |
---|
Procedure Filling(FillingData, StandardProcessing)
If TypeOf(FillingData) = Type("Structure")
AND FillingData.Property("Ref")Then
If TypeOf(FillingData.Ref) = Type("DocumentRef.Sepetleme") Then
docSepetlemeRef = FillingData.Ref;
SepetlemeReferans = docSepetlemeRef;
SepetSıraNo = docSepetlemeRef.SepetSıraNo;
For Each CurRowMalzemeBilgi In docSepetlemeRef.MalzemeBilgi Do
NewRow = MalzemeBilgi.Add();
NewRow.BoyaCinsi = CurRowMalzemeBilgi.BoyaCinsi;
NewRow.BoyaFirması = CurRowMalzemeBilgi.BoyaFirması;
NewRow.FirmaAdı = CurRowMalzemeBilgi.FirmaAdı;
NewRow.GirişTarihi = CurRowMalzemeBilgi.GirişTarihi;
NewRow.Kg = CurRowMalzemeBilgi.Kg;
NewRow.MalzemeAdedi = CurRowMalzemeBilgi.MalzemeAdedi;
NewRow.MalzemeBoyu = CurRowMalzemeBilgi.MalzemeBoyu;
NewRow.MalzemeÇevresi = CurRowMalzemeBilgi.MalzemeÇevresi;
NewRow.MalzemeNo = CurRowMalzemeBilgi.MalzemeNo;
NewRow.RalKodu = CurRowMalzemeBilgi.RalKodu;
NewRow.Yüzey = CurRowMalzemeBilgi.Yüzey;
EndDo;
EndIf;
EndIf;
//}}__CREATE_BASED_ON_WIZARD
EndProcedure |
after these changes everything works (screenshots 2 and 3).
Best,
Aleksandr