[BC17] How to replace code in standard CodeUnit
MelekBoujelbene
Member Posts: 17
Hello,
The CodeUnit 1535 "Approvals Mgmt." has the function 'SendApprovalRequestFromApprovalEntry' that I want to replace by my new function in my new CodeUnit.
I know that we cannot modify standard objects, so I created a new CodeUnit but I need to prevent the execution of the standard function.
Thanks in advance.
The CodeUnit 1535 "Approvals Mgmt." has the function 'SendApprovalRequestFromApprovalEntry' that I want to replace by my new function in my new CodeUnit.
I know that we cannot modify standard objects, so I created a new CodeUnit but I need to prevent the execution of the standard function.
Thanks in advance.
0
Best Answer
-
Maybe that event was not available yet in that version. Look in the codeunit and see if there is another event that you can subscribe to. If you don't know how to get the source code, you can browse this repo: https://github.com/StefanMaron/MSDyn365BC.Code.History0
Answers
-
Subscribe to the OnBeforeSendApprovalRequestFromApprovalEntry event. Execute your business logic and set the IsHandled parameter to true, which will cause an exit from the main function0
-
Thank you for your answer.
I cannot find "OnBeforeSendApprovalRequestFromApprovalEntry" event
0 -
I am using Version : W1 17.5 (plateforme 17.0.22463.0 + application 17.5.22499.0)0
-
Maybe that event was not available yet in that version. Look in the codeunit and see if there is another event that you can subscribe to. If you don't know how to get the source code, you can browse this repo: https://github.com/StefanMaron/MSDyn365BC.Code.History0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions