microsoft / ALAppExtensions

Repository for collaboration on Microsoft AL application add-on and localization extensions for Microsoft Dynamics 365 Business Central.
MIT License
768 stars 610 forks source link

Function ItemExists not reliable #7465

Closed miljance closed 4 years ago

miljance commented 4 years ago

The Function ItemExists in Sales Line Table can give a false result when used externaly if the Line is for example of type Resource.

Current State:

   procedure ItemExists(ItemNo: Code[20]): Boolean
    var
        Item2: Record Item;
    begin
        if Type = Type::Item then
            if not Item2.Get(ItemNo) then
                exit(false);
        exit(true);
    end;

should be something like:

   procedure ItemExists(ItemNo: Code[20]): Boolean
    var
        Item2: Record Item;
    begin
        if Type = Type::Item then begin
            exit(Item2.Get(ItemNo))
        end else
            exit(false);
    end;

Therefore from my point of view: code-defect

StanPesotskiy commented 4 years ago

Thank you for reaching out. Your suggestion seems to be a product bug not related to the AL extensibility. Please reach out to the relevant support channels as specified in Product Support On premises - https://support.microsoft.com/en-us/supportforbusiness/productselection?sapId=93d37907-ad94-d591-22e9-593cfa09dd3f On line – read more here https://docs.microsoft.com/en-ca/dynamics365/business-central/dev-itpro/administration/manage-technical-support or contact your partner If you are a partner open a support incident through Partner Center - https://partner.microsoft.com/en-us/pcv/dashboard/overview