I would like to update CustomProperty03 for Department where FullPath = 'PZ'. I've prepared the script:
Public Function HRS_Department_Update() As String
Dim dbDepartment As IEntity = Nothing
Dim f As ISqlFormatter = Connection.SqlFormatter
Dim result As String = "NOK"
If Session.Source.TryGet( Query.From("Department").Where(f.Comparison("FullPath", "PZ", ValType.String, , CompareOperator.Equal, FormatterOptions.NonUnicodeLiterals)).SelectNonLobs, dbDepartment ) Then
dbDepartment.PutValue("CustomProperty03", "Test")
result = "OK"
End If
Using uow As IUnitOfWork = Session.StartUnitOfWork()
uow.Put(dbDepartment)
uow.Commit()
End Using
Return result
End FunctionFunction returns "OK" but CustomProperty03 is empty.