I want to set a Capture batch field from within the KTM script. I have tried using this code but the batch field VariationID does not get updated when I look at the properties of the batch after KTM Validation. What am I doing wrong here?
Private Sub Batch_Close(ByVal pXRootFolder As CASCADELib.CscXFolder, ByVal CloseMode As CASCADELib.CscBatchCloseMode) pXRootFolder.XValues.ItemByName("AC_FIELD_VariationID").Value = "593" End Sub
Using XValues to work with index/batch fields is for read-only access only, so to et the values from KC into KTM environment. If you want to set the values back to KC, you need to do it via KTM fields and synchronization. To be able to set batch fields, you need to enable foldering in Project Settings. Then create a field in Project Folder and then when you synchronize the KTM project to KC batch class, there will additional two tabs related to folder synchronization, which allow you to synchronize KTM Project Folder fields into KC batch class batch fields.
In case you do not want to see the folder in Validation Form, you can set that field to be Always valid, then right click the Project Folder and select Customize Folder Validation Form and remove all the elements from folder validation form. Then the tab will not ne displayed.
Level of Complexity
|Kofax Transformation Modules||All|
Add any references to other internal or external articles