Symptoms
I am having an issue getting the attachments feature to work on my forms, all the forms have a button I created to save, but I cannot get the attachments view to save the items. I will also need the ability for an approver to remove an attachment and add a different one for the edit forms on save.
Diagnoses
Issue 1: Generated Attachments view not saving attachments giving errors.
Issue 2: Child list view on a form not correctly deleting list items.
Resolution
Resolution 1:
We removed all the user-added SmartObject method calls as they were not effective. For the attachments view to work, one needs to call the Add attachments method "for all items that have been added", supplying the ID and File reference from the Attachments SmartObject. I believe the reason it wasn't working was because that SmartObject reference returns multiple instead of single values, which can only be successfully filtered by a "for all items" method. Additionally, the parent SharePoint list ID was not being passed to the attachments view in the 'New' form. We added this via the return properties in the output mappings for the main view's 'Create List Items' method.
Resolution 2:
The wrong ID was being passed again it needed to be the child list view's SmartObject reference which returns multiple values that get filtered by the outer "for all items that have been deleted" rule.