Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Error on Product receipt

(0) ShareShare
ReportReport
Posted on by

Hey guys!

I have a Problem i cannot get rid of. 

I create a normal pruchase order and confirm this order.

Then I Change to Tab "Receive" and click on "Product receipt". Then I set a value for the "Product receipt" field and click OK.

Then I cet the following Errors:

Cannot edit a record in Batches (InventBatch).
The record has never been selected.

An error occurred during update

Microsoft.Dynamics.Ax.Xpp.ErrorException: Exception of type 'Microsoft.Dynamics.Ax.Xpp.ErrorException' was thrown.
   at Dynamics.Ax.Application.FormletterService.Run() in FormletterService.run.xpp:line 223
   at Dynamics.Ax.Application.FormletterService.Postpurchaseorderpackingslip(PurchFormLetterPackingSlipContract _contract) in FormletterService.postPurchaseOrderPackingSlip.xpp:line 14
   at FormletterService::PostPurchaseOrderPackingSlip(Object , Object[] )
   at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeInstanceCall(Object instance, String MethodName, Object[] parameters)
   at Dynamics.Ax.Application.SysOperationServiceController.Runoperation(Boolean _async) in SysOperationServiceController.runOperation.xpp:line 93
   at Dynamics.Ax.Application.SysOperationServiceController.runServiceOperation(Object[] parameters) in SysOperationServiceController.runServiceOperation.xpp:line 22
   at SysOperationServiceController::runServiceOperation(Object[] )
   at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[] parameters)
   at Dynamics.Ax.Application.SysDictClass.invokeStaticMethod(Object[] _params) in SysDictClass.invokeStaticMethod.xpp:line 26
   at SysDictClass::invokeStaticMethod(Object[] )
   at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[] parameters)
   at Microsoft.Dynamics.Ax.Xpp.PredefinedFunctions.runAsInvoke(String className, String staticMethodName, Object[] parms, Object[]& exportInfolog)
I really do not know where the Errors come from.
With some debuging I could find out, the the error occurs Maybe somewhere inside the super() call of the closeOK method of hte PurchEditLines Form.
I hope someone can help me here!
Thanks a lot in Advance!

*This post is locked for comments

  • Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: Error on Product receipt

    Service? It's a FormletterService class in AOT it has postPurchaseOrderPackingSlip method with next code:

    [SysEntryPointAttribute]

    FormletterOutputContract postPurchaseOrderPackingSlip(PurchFormLetterPackingSlipContract _contract)

    {

       formLetterContract = _contract;

       this.run();

       return outputContract;

    }

    I don't know why you cannot see it. Maybe screenshot could help us to understand your issue?

  • loijoc08 Profile Picture
    loijoc08 on at
    RE: Error on Product receipt

    can I set a breakpoint if there is no Code window?

  • Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: Error on Product receipt

    Put it anywhere and then click F11 until you reach a place where it throws exception.

  • loijoc08 Profile Picture
    loijoc08 on at
    RE: Error on Product receipt

    Thanks for the fast answer!

    I disables CIL. But if I look at Services and FormletterService and Postpurchaseorderpackingslip , I cannot find any Code where to but the breakpoint.

    Am I wrong somewhere?

  • Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: Error on Product receipt

    Hi loijoc08,

    You can disable execution in CIL in user options and then put a breakpoint into FormletterService.Postpurchaseorderpackingslip  and debug, thats the only way to find!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans