Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

To show total no of header and line attachment on form .

Posted on by 1,457
hi 
in  my custom i am having 3 buttons which create the attachment , two are on the header  and one is on line  when i select header attach ment shows total no of attachment for that header and when i move to line it shows total no of attachment on line , but is it possible if i can show the total no of attachment of line and header both when i select header .   
can anyone one guide me on this , how can i get this done .
 
 
thanks,
Regards,
Dinesh 
  • Suggested answer
    Kevin Xia Profile Picture
    Kevin Xia Microsoft Employee on at
    To show total no of header and line attachment on form .
    Hi Dinesh,

    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:

    1. 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.

    2. 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.

    3. 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.

    4. Update the Control: When a new attachment is created or deleted, update the respective control with the updated count for header and line attachments.

    5. Refresh the Form: Make sure to refresh the form or relevant controls to reflect the changes in the attachment count.

    Best regards,
    Kevin

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans