These issues can have different causes depending on when they occur.
If you receive the error "Apsona lex.merge.btn: Invalid action code", verify that the Lightning Home Page button was generated using the Detail Page target. This error commonly occurs when the action code is generated using the List View target instead. Regenerating the action code with the correct target and updating the button configuration resolves the issue.
If the merge action runs but intermittently generates an empty output, the issue is typically related to the merge configuration rather than the button itself. Review the merge action to ensure that the top-level and sublist data sources are properly linked so that only related records are retrieved. Also, check the size of the underlying reports, as large datasets combined with missing linkages can cause the merge action to retrieve excessive data, resulting in inconsistent or empty output.
Although clearing the Apsona cache can resolve issues caused by stale metadata, it should not be required on a regular basis. If merge output is inconsistent, review the merge configuration, report design, and data linkages before relying on cache clearing as a workaround.
When troubleshooting Home Page merge buttons, always verify that:
The button action code was generated using the Detail Page target.
The top-level and sublist reports are correctly linked.
The reports return only the required data and are not unnecessarily large.
Following these practices helps ensure that Home Page merge actions execute consistently and return the expected output.