My typescript function executes an action in the workshop app which is expected to update 2 ontology objects - ES BOM Line Item and Production BOM Line Item. I have specified both the ontologies in the Edits decarator. One of the function parameters is line_item which is of type ES BOM Line Item. I am able to modify values to properties of line_item object which is reflected in the ontology as well.
However, the modifications applied to the Production BOM Line Item objects are not applied to the ontology even though I am able to view the changes using the ‘live preview’ feature of the functions. I am using Objects.search() to retrieve the object instances of Production BOM Line Item and applying the modifications to those properties. This works properly for other functions.
Can a function backed action edit only one object at a time? I fail to understand why I am unable to update the Production BOM Line Item objects. Any help is appreciated!