Hello Everyone,
We are trying to develop a custom code for creating an instance with the Physical Inventory Count object for the Inventory Adjustment activity.
Using a custom object before save we are trying to populate the value for the instance and attached is the program code we used.
We are facing the errors when trying to save the instance saying "Operation Not Possible, Document Not Finished". and Save Failed

Anyone having any experience with this code, please help me out.
Thanks.