Answer the question
In order to leave comments, you need to log in
Why does it work in the file database, but in the client-server database there is an error "An attempt to transfer a mutable value of the 1st parameter from the client to the server ..."?
1C 8.3, SCP 1.3 (regular application), client-server base.
There is a subscription to the event Processing document posting Claim-invoice . The handler for this subscription is in a shared module.
When posting the Invoice-Requirement document , the following error occurs:
, which was absent in the file version of this database.
How to fix it?
The error occurs before the execution of the body of the procedure begins:
Answer the question
In order to leave comments, you need to log in
1) When working in a file base, everything is in the memory of your computer - there are no problems here. But when it comes to the interaction of your client computer with the server computer, the server no longer has access to your RAM - the information transferred for processing is packed into containers and sent over the network. Until everything is clear?
2) When programming on the 1C platform, when working with a database, we work either with Links or with the Objects obtained with their help. A reference differs from an Object in that it is immutable - it's just an address with a data type and a unique identifier. But the Object, unlike the Link, can be changed and written back to the database at the address of this Link. I think this is also understandable.
3) What are you trying to do? You have a modified Object in memory locally (in the Source variable) and want to transfer it to the server for further parallel processing here and there. Unfortunately, we are not working on quantum computers, and therefore the effect of entanglement is not available to us. We can edit the Object either locally or on the server. But not in two places at the same time!
Total. Judging by the text of your procedure, you do not need to transfer the Source at all - transfer the Foundation Document right away. But if it is assumed that the Object needs to be changed on the server, then a) write it locally, b) pass a Link to it, c) read it from the Link on the server, d) write the Object to the database after the change on the server, e) after the control flow returns on the client, read the Object from the database by Reference.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question