Hi guys,
I need to create Sales Invoices (and eventually Purchase Invoices) for a customer but doing it automatically through C/Side code...
I have a dataport that imports a whole heap of data into our system and basically only want the user to enter a few details on the Dataport Options form and have the rest automated, to the point of posting to the GL, printing/email/faxing the invoice and finalising it all, as if they'd done it manually...
I know all the details for the Invoice, customer no., line items, etc.. my question is, do I just go and create the records in the Header/Line tables manually, or is there some pre-existing functions that I can call to do everything for me correctly...??
Any help would be very much appreciated..
Thanks
.
I'm not crazy !!! Just ask my toaster...
.
0
Answers
I hope that the second case.
You need to create the header and lines in correct way and run the necessary codeunits to post it, print it etc.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Cheers!
Second case... I need to Create a Sales Invoice and then Post & Print the Sales Invoice..
I was just hoping someone could point to the right code unit(s) and functions to create the invoice lines, etc...
I'm not crazy !!! Just ask my toaster...
.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
RIS Plus, LLC
The data is actually coming into a staging area, I just chose not to mention that to reduce some of the complexity of the problem...
Kine,
I'll have a look at that code unit...
Thanks
I'm not crazy !!! Just ask my toaster...
.
The logical places to find order creation functions would be on requisition, planning, MRP type functionality, places like that. Maybe you can steal some logic from order creation routines from blanket orders.
Then when you have a good idea about how it's done in the standard app, you can use similar logic to create your own system.
RIS Plus, LLC
Auto posing and printing is fairly straight forward - you just call codeunit 80 or 90 dependong on whether it's sales or purchases and pass it the Sales/Purchase header record.
One word of caution here as you mentioned printing as well. Make sure that you commit or otherwise seperate things out so that your printing process DOES NOT keep locsk on those Sales & other ledger type tables. I've seen auto posting & printing scenarios where performance degrades significantly because the print part of the process is taking a while to complete and tying up other users from posting.
Epimatic Corp.
http://www.epimatic.com
You've been most helpful... I really appreciate the time you've taken to answer my question...
Hopefully not too much more ](*,) for me now... :-)
I'm not crazy !!! Just ask my toaster...
.
RIS Plus, LLC