Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Unanswered

Codeunit customization to Auto Post Non-Invt. Items for Dropshipment Sales Orders.

Posted on by
Hey Guys,
 
We are using Non-Invt Items with General Prod. Posting Group /FREIGHT/ add freight charges to the Sales and Purchase Orders, instead of Item Charges. 
 
For the Dropshipment orders, we had multiple scenarios where the freight line had to added to Sales Orders, but do not require it in a linked purchase order, as we have our own freighting companies to pick up P.Os from vendor, as forward freight. 
 
For these orders, we cannot automatically post freight lines in Sales Orders, as the freight line is not linked to P.O.
 
 
To address this issue, I am trying to develop a custom codeunit, and using Event handler, I am hoping to post the Sales Lines similar to the /Auto Post Non-Invt. via Whse. / function in BC, as below . 
 
 
I am struck at this stage, as I am struggling to figure out the exact trigger in codeunit: / Purch.-Post /. 
 
Can anyone suggest if I am on the right track, and which trigger I can use in this scenario.
 
Thanks in advance for any help
 
 
 
Categories:

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,995 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,610 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans