Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

The application object or method 'BGQRCodeProvider' has scope 'OnPrem' and cannot be used for 'Cloud' development.

Posted on by 10

I am getting this error along with others.

I am using target cloud. 

{
  "id": "0cf8f8cd-5d40-4fa5-a36e-e19e500dd0ad",
  "name": "Distribution System",
  "publisher": "Gas",
  "version": "1.0.0.0",
  "brief": "",
  "description": "",
  "privacyStatement": "",
  "EULA": "",
  "help": "",
  "url": "",
  "logo": "",
  "dependencies": [],
  "screenshots": [],
  "platform": "1.0.0.0",
  "application": "21.0.0.0",
  "target": "Cloud",
 
 
  "idRanges": [
    {
      "from": 70001100,
      "to": 70001250
    }
  ],
  "resourceExposurePolicy": {
    "allowDebugging": true,
    "allowDownloadingSource": true,
    "includeSourceInSymbolFile": true
  },
  "runtime": "10.0",
  "features": [
    "NoImplicitWith"
  ]
}

Error in apps.json

ErrorsOnAppsJson.jpg

Please help 

Warm regards

Chowadry

  • Murthy Chowdary Profile Picture
    Murthy Chowdary 10 on at
    RE: The application object or method 'BGQRCodeProvider' has scope 'OnPrem' and cannot be used for 'Cloud' development.

    So Far no third-party code is taken.

    Straight converted from CAL to AL with Txt2tool

    ------------------------------------------------------------

    page 70001162 "BGS_Cust Dis. Charges"

    {

       PageType = List;

       SourceTable = "BGS_Charges and disc Component";

       layout

       {

           area(content)

           {

               repeater(Group)

               {

                   field("Component type"; rec."Component type")

                   {

                       Style = None;

                       // StyleExpr = LeavColor;

                       // trigger OnValidate()

                       // begin

                       //     //CurrPage.EDITABLE(FALSE);

                       //     if rec."Component type" = rec."Component type"::Transport then begin

                       //        // LeavColor := 'Ambiguous';

                       //         //CurrPage.UPDATE;

                       //     end;

                       //     if rec."Component type" = rec."Component type"::Distance then

                       //       //  LeavColor := 'Favorable';

                       //     //MESSAGE('Charging '+LeavColor);

                       //     if rec."Component type" = rec."Component type"::Group then

                       //        // LeavColor := 'AttentionAccent';

                       //     //StandardAccents

                       // end;

                   }

                   field("Cust Component"; rec."Cust Component")

                   {

                       // StyleExpr = LeavColor;

                   }

                   field("Cust Component name"; rec."Cust Component name")

                   {

                       //  StyleExpr = LeavColor;

                   }

                   field("Job No"; rec."Job No")

                   {

                       Caption = 'Job/Project';

                       //  StyleExpr = LeavColor;

                   }

                   field("Charge  Cycle"; rec."Charge  Cycle")

                   {

                       // StyleExpr = LeavColor;

                   }

                   field("Effetive date"; rec."Effetive date")

                   {

                       // StyleExpr = LeavColor;

                   }

                   field(NextBillDate; rec."Next Bill Date")

                   {

                       Caption = 'Next Bill Date';

                       //StyleExpr = LeavColor;

                   }

                   field(Lastbilldate; rec."Last bill Date")

                   {

                       Caption = 'Last Bill Date';

                       // StyleExpr = LeavColor;

                   }

                   field("Default Amount"; rec."Default Amount")

                   {

                       Caption = 'Amount';

                       DecimalPlaces = 3 : 3;

                       // StyleExpr = LeavColor;

                   }

                   field(Quantity; rec.Quantity)

                   {

                   }

                   field("Amount Type"; rec."Amount Type")

                   {

                       Style = Ambiguous;

                       // StyleExpr = LeavColor;

                   }

                   // field(Minqty; MinQty)

                   // {

                   //     Caption = 'Min Qty.';

                   //     // StyleExpr = LeavColor;

                   //     trigger OnValidate()

                   //     begin

                   //         if  MinQty > 0 then

                   //             MinVal := 0;

                   //     end;

                   // }

                   // field(Minval; MinVal)

                   // {

                   //     Caption = 'Min Value';

                   //     StyleExpr = LeavColor;

                   //     trigger OnValidate()

                   //     begin

                   //         if MinVal > 0 then

                   //             MinQty := 0;

                   //     end;

                   // }

               }

           }

       }

       actions

       {

           Group(ActionGroup17)

    (Error : Syntax error, '}' expectedALAL0104

    Syntax error, '}' expectedALAL0104

    Expected one of the application object keywords (table, tableextension, page, pageextension, pagecustomization, profile, codeunit, report, reportextension, xmlport, query, controladdin, dotnet, enum, enumextension, interface, permissionset, permissionsetextension, entitlement)

    )

           {

               action("Confirm Customer Settinf")

               {

                   Caption = 'ConfirmSetting';

                   trigger OnAction()

                   begin

                      mycustomerno:=getcustomerno();

                       CurrPage.SetSelectionFilter(Rec) ;

                       if Rec.FindFirst then

                          begin

                            repeat

                               customerChargeLines.Reset;

                               customerChargeLines.SetRange(customerChargeLines."Component Line type",Rec."Component type");

                               customerChargeLines.SetFilter(customerChargeLines."Cust Component",Rec."Cust Component");

                               customerChargeLines.SetFilter(customerChargeLines."Customer No",mycustomerno);

                               if not customerChargeLines.Find('-') then

                                 customerChargeLines.Init;

                                 customerChargeLines."Component Line type":="Component type";

                                 customerChargeLines."Cust Component":="Cust Component" ;

                                 customerChargeLines."Cust Component name":="Cust Component name";

                                 customerChargeLines."Default Amount":="Default Amount";

                                 customerChargeLines."Job No":="Job No";

                                 customerChargeLines."Charge  Cycle":="Charge  Cycle";

                                 customerChargeLines."Effetive date":="Effetive date";

                                 customerChargeLines."Customer No":=Mcustomerno;

                                 customerChargeLines.Insert;

                               until Rec.Next=0;

                           end;

                       CurrPage.Close;

                       exit;

                       CurrPage.Close;

                   end;

               }

           }

       }

       trigger OnAfterGetRecord()

       var

           Jobno: Code[10];

           Mselect: Boolean;

       begin

           //CurrPage.EDITABLE(FALSE);

           if "Component type"="Component type"::Transport then

              begin

               LeavColor:='Ambiguous';

               //CurrPage.UPDATE;

             end;

           if "Component type"="Component type"::Distance  then

               LeavColor:='Favorable';

           //MESSAGE('Charging '+LeavColor);

           if "Component type"="Component type"::Group  then

               LeavColor:='AttentionAccent';

           //StandardAccents

       end;

       trigger OnClosePage()

       begin

           recCount:=0;

           Clear(Rec);

           CurrPage.SetSelectionFilter(Rec) ;

           if Rec.FindFirst then

              begin

                repeat

                 if Rec."Customer no"<>'' then

                 begin

                   customerChargeLines.Reset;

                   customerChargeLines.SetRange(customerChargeLines."Component Line type",Rec."Component type");

                   customerChargeLines.SetFilter(customerChargeLines."Cust Component",Rec."Cust Component");

                   customerChargeLines.SetFilter(customerChargeLines."Customer No",mycustomerno);

                   customerChargeLines.SetRange("Effetive date","Effetive date");

                   if not customerChargeLines.Find('-') then

                     customerChargeLines.Init;

                     customerChargeLines."Component Line type":="Component type";

                     customerChargeLines."Cust Component":="Cust Component" ;

                     customerChargeLines."Cust Component name":="Cust Component name";

                     customerChargeLines."Default Amount":="Default Amount";

                     customerChargeLines.Quantity:=Quantity;

                     customerChargeLines."Job No":="Job No";

                     customerChargeLines."Charge  Cycle":="Charge  Cycle";

                     customerChargeLines."Effetive date":="Effetive date";

                     customerChargeLines."Customer No":=Rec."Customer no";

                     customerChargeLines.Insert;

                     recCount:=recCount+1;

                   end;

                until Rec.Next=0;

               end;

               Clear(Rec);

               Message('# of customer setup records updated : '+Format(recCount));

           CurrPage.Close;

       end;

       Protected var

           Mcustomerno: Code[10];

           Jobno: Code[10];

           Mselect: Boolean;

           public LeavColor: Text;

           LastbillDate: Date;

           Naextbilldate: Date;

           MinQty: Integer;

           MinVal: Decimal;

           customerChargeLines: Record "BGS_Cust Charges and disc";

           mycustomerno: Code[20];

           recCount: Integer;

       [Scope('Cloud')]

       procedure getcustomerno(var CustomerNo: Code[20])

       begin

             Mcustomerno:=CustomerNo;

       end;

    }

    -------------------------------------------------------------

    It is 50009 file name object number is

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,748 Super User 2024 Season 1 on at
    RE: The application object or method 'BGQRCodeProvider' has scope 'OnPrem' and cannot be used for 'Cloud' development.

    Maybe you can share your code in Page 50000 The problem seems to originate from that page.

    It looks like you are trying to use a 3.party library that is not compatible with running Business Central in the cloud.

  • Murthy Chowdary Profile Picture
    Murthy Chowdary 10 on at
    RE: The application object or method 'BGQRCodeProvider' has scope 'OnPrem' and cannot be used for 'Cloud' development.

    ErrorInPage50009.jpg

  • Murthy Chowdary Profile Picture
    Murthy Chowdary 10 on at
    RE: The application object or method 'BGQRCodeProvider' has scope 'OnPrem' and cannot be used for 'Cloud' development.

    {

       "version": "0.2.0",

       "configurations": [

           {

               "name": "Microsoft cloud sandbox",

               "request": "launch",

               "type": "al",

               "environmentType": "Sandbox",

               "environmentName": "BGS",

               "startupObjectId": 22,

               "startupObjectType": "Page",

               "breakOnError": "All",

               "launchBrowser": true,

               "enableLongRunningSqlStatements": true,

               "enableSqlInformationDebugger": true

           }

       ]

    }

  • Suggested answer
    Amit_Sharma Profile Picture
    Amit_Sharma 2,545 on at
    RE: The application object or method 'BGQRCodeProvider' has scope 'OnPrem' and cannot be used for 'Cloud' development.

    Hello 

    Refer the below link

    https://erpconsultors.com/generate-barcode-in-business-central/

    Regards

    Amit Sharma

    www.erpconsultors.com

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: The application object or method 'BGQRCodeProvider' has scope 'OnPrem' and cannot be used for 'Cloud' development.

    Also share your Launch.json file.

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: The application object or method 'BGQRCodeProvider' has scope 'OnPrem' and cannot be used for 'Cloud' development.

    Did you try YELLOW mark in below?

    {
      "id""0cf8f8cd-5d40-4fa5-a36e-e19e500dd0ad",
      "name""Distribution System",
      "publisher""Gas",
      "version""1.0.0.0",
      "brief""",
      "description""",
      "privacyStatement""",
      "EULA""",
      "help""",
      "url""",
      "logo""",
      "dependencies": [],
      "screenshots": [],
      "platform": "21.0.0.0",
      "application""21.0.0.0",
      "target""Cloud",
     
     
      "idRanges": [
        {
          "from"70001100,
          "to"70001250
        }
      ],
      "resourceExposurePolicy": {
        "allowDebugging"true,
        "allowDownloadingSource"true,
        "includeSourceInSymbolFile"true
      },
      "runtime""10.0",
      "features": [
        "NoImplicitWith"
      ]
    }
  • Murthy Chowdary Profile Picture
    Murthy Chowdary 10 on at
    RE: The application object or method 'BGQRCodeProvider' has scope 'OnPrem' and cannot be used for 'Cloud' development.

    Hi Mohana,  

    I Request a positive answer if you have a solution.  Please if you can get a way out instead a dead end here.

    Warm Regards

    Murthy

  • Suggested answer
    DAnny3211 Profile Picture
    DAnny3211 9,272 Super User 2024 Season 1 on at
    RE: The application object or method 'BGQRCodeProvider' has scope 'OnPrem' and cannot be used for 'Cloud' development.

    hi

    look this

    community.dynamics.com/.../the-application-object-or-method-has-scope-onprem-and-cannot-be-used-for-extension-development-al0296-error

    DAniele

  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,125 Super User 2024 Season 2 on at
    RE: The application object or method 'BGQRCodeProvider' has scope 'OnPrem' and cannot be used for 'Cloud' development.

    It means that you cannot use that method/object in Cloud development.

    You have to use alternate/different solution.

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 229,993 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans