where CLE is a record variable of Customer ledger entry
PostedSalesInv is a record variable of Posted Sales Invoice
PostedSalesInvoice is a form of Posted Sales Invoice
From the Ledger Entries screen, clicking on a particular transaction line should open the Posted Sales Invoice form with the invoice details.
Thanks,
Vinod
1) Just clicking on the line is not enough in NAV to open something... you need to use some button or button with hotkey to open it.
2) For same result you can use the Navigate functionality
3) Are you talking about GL Ledger entries or Item Ledger Entries?
2) For same result you can use the Navigate functionality
Click On entry->Navigate->Posted Sales Invoice->Show->Shft-F5
I guess they want to eliminate a click or 2 :whistle:
Navigate works fine no need to reinvent it. As stated above if you use code you have to plan for all the types.....
Do you want credits to show the posted credit?
Payments to show you the Deposit?
What if it was just a journal entry?
For me I would do something like...OnLookup of the Document No add code. (Using code snipit from above )
CASE "Document Type" OF "Document Type"::"Credit Memo":
BEGIN
CLEAR(PostedCreditForm);
PostedCreditInv.SETFILTER(PostedCreditInv."No.","Document No.");
PostedCreditForm.LOOKUPMODE(TRUE );
PostedCreditForm.SETTABLEVIEW(PostedCreditInv);
PostedCreditForm.RUNMODAL;
END
END;
CASE "Document Type" OF "Document Type"::Invoice:
BEGIN
CLEAR(PostedSalesForm);
PostedSalesInv.SETFILTER(PostedSalesInv."No.","Document No.");
PostedSalesForm.LOOKUPMODE(TRUE );
PostedSalesForm.SETTABLEVIEW(PostedSalesInv);
PostedSalesForm.RUNMODAL;
END
END;
CASE "Document Type" OF "Document Type"::Payment:
BEGIN
CLEAR(PostedPaymentForm);
PostedPaymentInv.SETFILTER(PostedPaymentInv."No.","Document No.");
PostedPaymentForm.LOOKUPMODE(TRUE );
PostedPaymentForm.SETTABLEVIEW(PostedPaymentInv);
PostedPaymentForm.RUNMODAL;
END
END;
Thanks for all the replies. The below code worked for us.
Added the following code to a button c/al code. Had to create two Global Variables InvoiceHeader & CreditMemoHeader in the Cust Ledger Entry Form.
IF "Document Type" = "Document Type"::Invoice THEN
BEGIN
InvoiceHeader.GET("Document No.");
FORM.RUN(FORM::"Posted Sales Invoice", InvoiceHeader);
END
ELSE IF "Document Type" = "Document Type"::"Credit Memo" THEN
BEGIN
CreditMemoHeader.GET("Document No.");
FORM.RUN(FORM::"Posted Sales Credit Memo", CreditMemoHeader);
END;
Answers
You can acheive this with code. You will need to do this for each type but here's sample code where CLE is a record variable of Customer ledger entry
PostedSalesInv is a record variable of Posted Sales Invoice
PostedSalesInvoice is a form of Posted Sales Invoice
Welcome to Mibuso
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
1) Just clicking on the line is not enough in NAV to open something... you need to use some button or button with hotkey to open it.
2) For same result you can use the Navigate functionality
3) Are you talking about GL Ledger entries or Item Ledger Entries?
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Can you not acheive the "double click" using a button with default property to yes ? ... Works for me
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
Ok, but what if I double-click outside the table box or on some edit box (like some header fields etc.)?
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Ok fair point but Vinod did say
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
Click On entry->Navigate->Posted Sales Invoice->Show->Shft-F5
I guess they want to eliminate a click or 2 :whistle:
Navigate works fine no need to reinvent it. As stated above if you use code you have to plan for all the types.....
Do you want credits to show the posted credit?
Payments to show you the Deposit?
What if it was just a journal entry?
For me I would do something like...OnLookup of the Document No add code. (Using code snipit from above )
PostedSalesInv-Record-Sales Invoice Header
PostedCreditInv-Record-Sales Cr.Memo Header
PostedSalesForm-Form-Posted Sales Invoice
PostedCreditForm-Form-Posted Sales Credit Memo
PostedPaymentInv-Record-Posted Deposit Header
PostedPaymentForm-Form-Posted Deposits
CLE-Record-Cust. Ledger Entry
Now all you have to do is use the lookup on the Document No of the CLE's and it will bring you to the Inv,Credit or payment
**note your Deposit tables might vary from mine
Someone will probably come by and convert this to 3 lines of code
http://www.BiloBeauty.com
http://www.autismspeaks.org
Added the following code to a button c/al code. Had to create two Global Variables InvoiceHeader & CreditMemoHeader in the Cust Ledger Entry Form.
IF "Document Type" = "Document Type"::Invoice THEN
BEGIN
InvoiceHeader.GET("Document No.");
FORM.RUN(FORM::"Posted Sales Invoice", InvoiceHeader);
END
ELSE IF "Document Type" = "Document Type"::"Credit Memo" THEN
BEGIN
CreditMemoHeader.GET("Document No.");
FORM.RUN(FORM::"Posted Sales Credit Memo", CreditMemoHeader);
END;