Hey.

There are people who fumbles in 1C.

The problem seems to be finally possible (but unfortunately it should be implemented on 1C), but 1C is not so good. There is a form for adding a document. I want to make a check when recording.

code

&НаКлиенте Процедура ПередЗаписью(Отказ, ПараметрыЗаписи) КонецПроцедуры 

All salt in that there is no access to those fields that in the form at record

The object that will be written is passed to this function.

 &НаСервере Процедура ПередЗаписьюНаСервере(Отказ, ТекущийОбъект, ПараметрыЗаписи) КонецПроцедуры 

But in 1C everything is so dreary that it’s banal to make an alert here because this type of function is performed on the server.

Question

How to get access to the fields of the form on the client when writing the object in the database.

That is, make a check and, if necessary, display an error that does not meet the condition of the record

    1 answer 1

    You cannot make an alert because this type of function is executed on the server.

    Can. See the Syntax Assistant for the Message to UserMessage procedure, it is available to be called anywhere.

    From the client, you can check the fields of the object only for fullness, by the function MeaningFilled ().

    • one
      I think the answer is worth mentioning that to verify the filling, there are relevant events on both the server and the client. - Aleksandr K.