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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Event of insert of Posted sales credit memo line with preview posting parameter in event subscriber

(3) ShareShare
ReportReport
Posted on by 12
Need to Find Event of insert of Posted sales credit memo line with preview posting parameter in event subscriber
I have the same question (0)
  • Suggested answer
    Suresh Kulla Profile Picture
    50,243 Super User 2025 Season 2 on at
    I am not sure what is your requirement but preview posting doesn't insert sales credit memo header, it executes different posting routine just to create Ledger Entries.
     
    The event available in codeunit 80 during credit memo insert is OnBeforeSalesCrMemoLineInsert
  • Suggested answer
    Mohana Yadav Profile Picture
    60,993 Super User 2025 Season 2 on at
    There is no event with previewMode in Posted sales credit memo line insert publisher.
     
    But if you can provide more details on what you are trying to do then we may suggest a different solution.
  • Suggested answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    14,284 Super User 2025 Season 2 on at
    It depends on what you are trying to achieve.
    See if you can do it using other events, such as OnBeforePostSalesDoc.
     
    You can also request to add PreviewPosting to the parameter, but this will take a while.
    Or you can use SingleInstance codeunit to flag during OnBeforePostSalesDoc and run the logic on OnAfterInsertCrMemoHeader if the flag is on.
  • Suggested answer
    Kamal Khakhkhar Profile Picture
    1,274 on at
    Hii There as per requirement there is event in  codeunit 80 "Sales-Post" -> 
    OnBeforePostSalesDoc(SalesHeader2, SuppressCommit, PreviewMode, HideProgressWindow, IsHandled, CalledBy);
     
     
    so in that PreviewMode is boolean , so you can add logic according to your requirement..
     
    if you found answer . mark it answered.
     
     
    Thank You.
    Kamal Khakhkhar

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,143

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,694 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,067 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans