Automatic Posting of item charges

Tejaswini
Member Posts: 75
Hi All,
I have created a field carrier charges in sales line and in sales order sub form I added this field, when I am posting the item in sales order the carrier charges should come as item charges, the new line of item charges should be post in background while posting the item and I have written the code for adding the new line of item charges automatically for example
Now I have the first Line as ->Item in sales order before ship
After ship now I have the second Line as ->Charge (item) Then I want to invoice the item with item charges but it throw me the error like U must assign item charges if u want to invoice it
But I don't want to use the item charge assignment feature ,without using that feature it should get invoice
for that I have written the code like inserting the required fields in item charge assignment(Sales) table and by not using that feature the item get invoiced with item charges
But my problem is it didn't get updated in value entries and in posted sales invoice, G/L entry, tax entry I can able to see the second line of item charges
Please help me to post the item with item charges in value entries
I have created a field carrier charges in sales line and in sales order sub form I added this field, when I am posting the item in sales order the carrier charges should come as item charges, the new line of item charges should be post in background while posting the item and I have written the code for adding the new line of item charges automatically for example
Now I have the first Line as ->Item in sales order before ship
After ship now I have the second Line as ->Charge (item) Then I want to invoice the item with item charges but it throw me the error like U must assign item charges if u want to invoice it
But I don't want to use the item charge assignment feature ,without using that feature it should get invoice
for that I have written the code like inserting the required fields in item charge assignment(Sales) table and by not using that feature the item get invoiced with item charges
But my problem is it didn't get updated in value entries and in posted sales invoice, G/L entry, tax entry I can able to see the second line of item charges
Please help me to post the item with item charges in value entries
0
Answers
-
Set up and assign an Item Charge line on your sales order using the standard manual method. Then compare the resulting "Item Charge Assignment (Sales)" record to the ones being created by your process. I suspect you may find a difference.
If the "Item Charge Assignment (Sales)" records are created properly, the posting code (CU 80) should handle the rest.
There are no bugs - only undocumented features.0 -
Okay thank you
how to set the document no for the new line that I want to create automatically
for example in sales order subform of sales order
first line as item -> document no. is 1900
second line as charge (item) -> document no. should be 1900 but it is taking as null
my code didn't find out the first record in sales order
please suggest me the code for it.0 -
And I have written the code in code unit 80 and I have called it in 81 code unit after invoice0
-
The "Item Charge Assignment (Sales)" records need to be created before the invoice posting step begins. Look at the standard charge assignment function as a guide in creating the records.
There are no bugs - only undocumented features.0 -
Thank you,
But I want to create the new line of item charge by writing the code with required fields While we hit the post button in sales order the item with item charges should get posted ,so I have to create the function in code unit 80 and I want to call this function at the post button of On Push before the CODEUNIT.RUN line and it should be updated in all entries by post the item in sales order
Please suggest me the code for it.
It's very urgent...0 -
If you are going to create the new sales lines and "Item Charge Assignment (Sales)" records in codeunit 80, they must be created before the "CopyAndCheckItemCharge" function is called.
There are no bugs - only undocumented features.0 -
Yes I have created before that function but the new line of item charges is not posted in value entries0
-
except value entries it is updated in all entries0
-
please suggest me to post it in value entries
0 -
Debug a posting. See if the function "CopyAndCheckItemCharge" is picking up your "Item Charge Assignment (Sales)" records and populating "TempItemChargeAssgntSales". This temporary table is then processed by "PostItemChargePerOrder" to post the charges.
If the temporary table is getting populated, then step thru the "PostItemChargePerOrder" function to see why it is failing to post the entries.
There are no bugs - only undocumented features.0 -
If you don't post the code you have written then it's very difficult for others to help you as they can't see what you may have done wrong. The more information you provide the more chance you have of someone being able to help you.
For example, you may have created the sales line with the item charge incorrectly, but there's no way for anyone to know this and tell you where you have gone wrong.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions