You can display the total number of attachments for both the header and lines when you select the header. To achieve this, you would typically need to customize the form and use X++ code. Here's a general approach on how to get this done:
Customize the Form: You'll need to customize the form where you have the buttons for creating attachments. In your case, this is likely a custom form.
Add a Control: On the header of the form, add a control (e.g., a text box or label) to display the total number of header attachments. On the line section of the form, add a control to display the total number of line attachments.
Write X++ Code: You'll need to write X++ code to calculate and update the total number of attachments for both the header and lines. You can use event handlers to trigger this code when an attachment is created or deleted.
Update the Control: When a new attachment is created or deleted, update the respective control with the updated count for header and line attachments.
Refresh the Form: Make sure to refresh the form or relevant controls to reflect the changes in the attachment count.
André Arnaud de Cal... 291,391 Super User 2024 Season 2
Martin Dráb 230,445 Most Valuable Professional
nmaenpaa 101,156