Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Business Central forum

Error handling

(0) ShareShare
ReportReport
Posted on by 45

Hi, 

I need to skip the error in default code. is there any method please suggest me?

Scenario : 

If I change the value in sales line, it will reflect in purchase line for items (dropship) in existing sales order. In this case below error will throw. I need to skip this error in AL . Please Suggest me.

pastedimage1562862285874v1.png

Categories:
  • Verified answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    13,637 Moderator on at
    RE: Error handling

    There is OnBeforeCheckAssocPurchOrder function that you can subscribe to. You can change the IsHandled value to TRUE, and create your own logic there.

  • Revanth M Profile Picture
    45 on at
    RE: Error handling

    I need to add,delete and modify the item(dropship) in purchase order from respective sales order (Requirement).

  • Revanth M Profile Picture
    45 on at
    RE: Error handling

    AL language Version-3.0.145991

    BC Version - 13.0.26413.0

    I did in C/AL in CheckAssocPurchOrder function and skip the error using some conditions . But in AL am not having an idea how to add a

    condition in that default function.

  • Suggested answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    13,637 Moderator on at
    RE: Error handling

    In drop shipment, your sales quantity should be the same as purchase quantity. Why do you want to skip the error ?

  • Suggested answer
    Suresh Kulla Profile Picture
    47,789 on at
    RE: Error handling

    That condition is checked in the CheckAssocPurchPorder, you need to add code to skip that function call, which version you are working on?

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central forum

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans