Dear Sir,
I'm sending Web request into a Web Portal during Sales Invoice Posting in NAV 2016 database & receiving the Web response in reply.
Now I want if there is any issue found in response data then posting should be roll backed & if there is any issue/inconsistency in Sales Invoice then request should be roll backed.
How can I achieve that ? Kindly reply.
Thank you.
*This post is locked for comments
[quote user="subrata.bauri"]
I just want to know is there any possibility in the system to know that the Posting may create any G/L Inconsistency error in Codeunit 80.
[/quote]
No, it's not possible to catch errors upfront, which might occur during posting.
Already, I have done in the current system what you said.
I just want to know is there any possibility in the system to know that the Posting may create any G/L Inconsistency error in Codeunit 80.
Yeah, that's what I meant with "Uploading data during a posting is always a problem."
I've came across this problem on several occasions. This is mostly a problem with webservices for payment transactions (credit card etc.).
In this situation, I would utilize the event "OnAfterPostSalesDoc".
Basically, do your postings in NAV and handle the errors as you like.
When posting is done, the data is uploaded to the webservice.
In case an error occurs in the webservice, show the error (keep the invoice posted) and give the user the oppurtinity the upload the data manually after the posting.
Yes.
Hi,
you mean, you want to catch any possible NAV-error before uploading the data to the WebService?
Thanks for your reply.
I have already applied all the required validations which are mandatory in WS. The all validations are written in the Codeunit 80 ("OnBeforeSalesPost") but how can I assume that posting sale invoice will have G/L consistency while creating G/L Entries in NAV.
Suppose a Web Request has been uploaded successfully during posting a Sales Invoice but unfortunately the nav posting gets roll backed due to G/L Inconsistency error message. I want to consider this kind of error (if occurs) message in CU 80.
Is it possible ?
Hi,
Uploading data during a posting is always a problem.
Not sure for NAV2016. Check if there is an event called "OnBeforeSalesPost" in Codeunit 80.
Subscribe this event and execute your code. When your web response is negative, show an error message (this will cancel the whole posting transaction).
Dear Sir,
When we post any Sales Invoice in NAV it will create few G/L Entries. And if there is any difference between sum of total debit & Credit Columns then the system will throw a Inconsistency error message in NAV. This inconsistency error occurs from Codeunit 12 Gen. Jnl.-Post Line.
I just want to know is there any possibility to get/generate/calculate the same error message (if any) in Codeunit 80 Sales-Post ?
A posting inside NAV (codeunit 80) is always consistent. The transaction is committed if all is ok, otherwise you receive an error and all is rolled back. So, what do you mean exactly with “G/L Entry consistency”?
Thanks for your instant reply.
Is there any possibility to check G/L Entry Consistency before Committing a Sales Invoice Posting in Codeunit 80 ?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156