Use Case Order Entity with child OrderDocument:- - 1:1 association between Order and OrderDocument. - Order Document is a specialization of System.FileDocument. Microflow On a New Order record event, I call a microflow that: - creates a new Order object, updates default values and commits Order. - creates a new OrderDocument object, updates the association and commits OrderDocument. - opens page Order (form). Issue The first time I open the Order form: - the Order data view is correctly populated. - the OrderDoucment data view is greyed out (as if the object has not been created) and it cannot be updated (neither the System.FileDocument attributes nor the custom attributes that I added in addition to the System.FileDocument attributes). If I save the form, then re-open it: - both data views are correctly populated. - the OrderDoucment data view is no longer greyed out and I can update all fields. If I drop the System.FileDocument specialization for OrderDocument: - everything works fine… If I create a data grid of OrderDocument and use the standard New button to call a popup page form: - everything works fine. So it seems that, even though my microflow is committing the OrderDocument, something is not being truly saved until I click the standard save button and return to the form. Question(s) - is there any additional microflow action that I can perform that would cause Mx to interpret the OrderDocument entity as saved? - does the standard Save button do anything that a microflow Commit action doesn’t do?
asked
Brooks Jealous
2 answers
0
Have you already tried using the ‘refresh in client’ when committing your Order and Order Document objects?
-Neil
answered
Neil Hones
0
The only way I got this to work was with a final commit on the Order entity in my microflow. So the sequence is now:
- create new Order
- change default vaues
- commit Order
- create new OrderDocument
- change default vaues
- commit OrderDocument
- commit Order (again)
Don’t ask me why, but this works. And it’s only necessary for entities based on System.FileDocument ...