Hello everybody,
I am trying to update a property with the following code:
[... lookups is initialized ...]
propertyValueNew.Value.SetValueToMultiSelectLookup(lookups);
The M-Files Community will be updated on Tuesday, April 2, 2024 at 10:00 AM EST / 2:00 PM GMT and the update is expected to last for several hours. The site will be unavailable during this time.
Hello everybody,
I am trying to update a property with the following code:
[... lookups is initialized ...]
propertyValueNew.Value.SetValueToMultiSelectLookup(lookups);
It could be the "lastObjVer" that plays tricks on you. It seems to represent the last checked in objVer, and you need to add 1 to its value to get the currently checked out ObjVer. The system creates a new ObjVer when the object is checked out by your process.
No, the method is fine. My point was that the result in some cases will be the latest version checked in on the server - let's say it is version 5. When you check out the object in order to manipulate it, version 6 is created. If you still attempt to change version 5, you will get an error. With LastObjVer you have an option AllowCheckedOut which in your case has been set to False. Changing it to True may solve the problem. I have sometimes had to save the latest version in a variable and then add 1 before I could use the result for my purpose.
the right code was