web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Business Central forum

Business Central Subscriber Events

(0) ShareShare
ReportReport
Posted on by 245

We have a custom Code unit where we are using the Custom Function in a Slandered Code unit 5760 Whse.- Post Shipment.

Below is the Custom Functions of Whse.- post shipment Cu.

Functions-in-5763-CU.png

We are Calling these two Customs functions as below in a custom CU.

Custom-Cu-.png

In Event Subscriber how can we write code, as the First Custom Function has Standard Variable CounterSourceDocOK and CounterSourceDocTotal,also we have checked this CU 5763 in Business central and not have any Events in having these two variable as Parameter, so that we can subscribe and write our Logic.

Any Assistance will be helpful.

Thank You in Advance.

Manikanta.

Categories:
  • Suggested answer
    Stefano Demiliani Profile Picture
    37,172 Most Valuable Professional on at

    As said many times here, on SaaS you can only subscribe to events raised by the standard application, you cannot "inject" code into a standard codeunit or a standard object. Your GetResultMessageWeb function must be an event subscriber of something in the Whse.- Post Shipment codeunit. Only in this way you can receive the global variables you need. Thenfrom this event subscriber you can call other custom codeunits as per your needs. No other way.

    If you cannot do that, you're forced to rethink your code. SaaS is different...

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans