Hello Ertuğrul,
please let me know which version of the 1C platform are you using?
In general, it's undesirable to use the "AfterWriteAtServer" Event to write additional object attributes...
If we want to save some additional attributes of the object while writing, it's better to use the "BeforeWriteAtServer" Event for this.
In your case, the source code will look like this:
| Code |
|---|
&AtServer
Procedure BeforeWriteAtServer(Cancel, CurrentObject, WriteParameters)
If IsTempStorageURL(PictureAddress) Тогда
CurrentObject.Resim = New ValueStorage(GetFromTempStorage(PictureAddress));
EndIf;
EndProcedure |
For the image to be displayed when the form is opened, don't forget about the "OnCreateAtServer" event:
| Code |
|---|
&AtServer
Procedure OnCreateAtServer(Cancel, StandardProcessing)
PictureAddress = GetURL(Object.Ref, "Resim");
EndProcedure |