Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Changing No. Series in Warehouse Receipt Header Table

(1) ShareShare
ReportReport
Posted on by 15
Hello everyone,
I added a field named "Item Type" and depending on its value,
I want to change the No. Series of the "Warehouse Receipt Header" table (7316) before insertion, but I couldn't find any event to subscribe to.
Does anyone know the event or how to change the series number?
Thank you.
  • Suggested answer
    Yi Yong Profile Picture
    Yi Yong 1,685 Super User 2024 Season 2 on at
    Changing No. Series in Warehouse Receipt Header Table
    Hello,
    You should check and change the no series when posting the warehouse receipt.
    It will be too late to do it when inserting into posted warehouse receipt table.
     
    You can use the below event, it is called before system insert receiving no. to the receipt header.
    This event has both Header for you to change the receiving no. series and Lines for you to check the item type.
     
     
    ​[EventSubscriber(ObjectType::Codeunit, Codeunit::"Whse.-Post Receipt", OnAfterCheckWhseRcptLines, '', false, false)]
    local procedure "Whse.-Post Receipt_OnAfterCheckWhseRcptLines"(var WhseRcptHeader: Record "Warehouse Receipt Header"; var WhseRcptLine: Record "Warehouse Receipt Line")
    begin
    end;
    
     
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    Khushbu Rajvi. 6,590 Moderator on at
  • Suggested answer
    Alexander Drogin Profile Picture
    Alexander Drogin 170 on at
    Changing No. Series in Warehouse Receipt Header Table
    OnBeforeInsert event always exists for every table. It's a system event raised by the platform, so it doesn't have to raised from AL code, you can aways subscribe to it.
  • Waed Ayyad Profile Picture
    Waed Ayyad 6,636 Super User 2024 Season 2 on at
    Changing No. Series in Warehouse Receipt Header Table
     
    Sorry I thought you are asking about D365 FO.
     
     
    Thanks,
    Waed Ayyad
  • Meyssa Profile Picture
    Meyssa 15 on at
    Changing No. Series in Warehouse Receipt Header Table
    Thank you for replying but do you mean overriding the Insert method or subscribing to OnBeforeInsert (which doesn't exist in my case)?
  • Suggested answer
    Waed Ayyad Profile Picture
    Waed Ayyad 6,636 Super User 2024 Season 2 on at
    Changing No. Series in Warehouse Receipt Header Table
    Hi,
     
    Did you try to use the COC on the inset method?
     

    Thanks,

    Waed Ayyad

    If this helped, please mark it as "Verified" for others facing the same issue

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey Pt 2

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,514 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans