Sales Credit Memo/Purchase Credit Meno

Markandey_Pandey
Member Posts: 178
Hi all,
I am using Sales Credit Memo and Purchase Credit Memo for cancelling Sales Invoices and purchase invoices respectively.
Here what is want is, the reason code that i am selecting on Sales Credit memo should get updated on Posted Sales Invoice when i am posting the Sales Credit memo.
Can anybody tell me the solution.
I am using Sales Credit Memo and Purchase Credit Memo for cancelling Sales Invoices and purchase invoices respectively.
Here what is want is, the reason code that i am selecting on Sales Credit memo should get updated on Posted Sales Invoice when i am posting the Sales Credit memo.
Can anybody tell me the solution.
Markandey Pandey
0
Comments
-
You'll have to use code to do that.
Hopefully what you are doing is applying the credit memo's to their Invoices.
So if you have to in the future figure out how that invoice was closed you will be able to navigate to the applies entry and see that it was a credit memo and look at that credit memo to see the reason code.
You can also enter info into the Invoices Notes/Comments about what is goin on with that invoice0 -
Any help on how to get the referenced Posted Invoice No.Markandey Pandey0
-
at the time of posting the creditmemo - > Just selct the field in the application tab.
Applies - to Doc Type , Applies -to Doc No.
when posted credit memo - > Invocing tab - > Applies - to Doc Type , Applies -to Doc No.0 -
chengalasettyvsrao wrote:at the time of posting the creditmemo - > Just selct the field in the application tab.
Applies - to Doc Type , Applies -to Doc No.
when posted credit memo - > Invocing tab - > Applies - to Doc Type , Applies -to Doc No.
Thanx, i got it.Markandey Pandey0 -
Hi all,
I have written the following code for updating the Reason Code of Posted Invoices on OnPush trigger of Post Button of Sales Credit memo but its not working:
SalesInvHeader.RESET;
SalesInvHeader.SETRANGE(SalesInvHeader."No.","Applies-to Doc. No.");
IF(SalesInvHeader.FIND('-')) THEN
SalesInvHeader."Reason Code":=SalesHeader."Reason Code";
SalesInvHeader.MODIFY;
can anybody suggest me the solution.Markandey Pandey0 -
Check whether the client license has the permission to Sales Invoice Header table.CA Sandeep Singla
http://ssdynamics.co.in0 -
-
you should change your code a bit for testing like this with an if statement "just in case" so the code doesn't crash
if SalesInvHeader.GET("Applies-to Doc. No.") then begin
SalesInvHeader."Reason Code":=SalesHeader."Reason Code";
SalesInvHeader.MODIFY;
end else begin
message('doc not found');
end;
But as above, the first issue I see is that the Sales Invoice Header is usually not editable
I have to add the editable field to CU391 in my version.0 -
Savatage wrote:you should change your code a bit for testing like this with an if statement "just in case" so the code doesn't crash
if SalesInvHeader.GET("Applies-to Doc. No.") then begin
SalesInvHeader."Reason Code":=SalesHeader."Reason Code";
SalesInvHeader.MODIFY;
end else begin
message('doc not found');
end;
But as above, the first issue I see is that the Sales Invoice Header is usually not editable
I have to add the editable field to CU391 in my version.
Here SalesInvHeader is a variable of Record Type (Subtype- Sales Invoice Header)
and all the fields of the table is editable.
But Reason Code is not getting updated, i have tried your code alsoMarkandey Pandey0 -
This field has Tablerelation to Reason CodeNAV - Norton Anti Virus
ERP Consultant (not just Navision) & Navision challenger0 -
Run the debugger and check whether your code is getting executed or not?
Where have you put your code and how it is getting fired?CA Sandeep Singla
http://ssdynamics.co.in0
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