Skip to main content

Notifications

Announcements

No record found.

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

Unknown error when publishing custom API

Posted on by 86
I am trying to create a custom API using vscode / AL. I have follow the example in the documentation for the API car brand / car model.
When I try to publish I get the following error.
 
  Reason: Your license does not grant you the following permissions on TableData 2000000206 Published Application: IndirectInsert for company CRONUS USA, Inc..
 
My launch json looks like:
    "version": "0.2.0",
    "configurations": [
        {
            "name": "IOTW Server",
            "request": "launch",
            "type": "al",
            "environmentType": "Sandbox",
            "environmentName": "D365Env",
            "startupObjectId": 22,
            "startupObjectType": "Page",
            "schemaUpdateMode": "ForceSync",
            "breakOnError": "All",
            "launchBrowser": true,
            "enableLongRunningSqlStatements": true,
            "enableSqlInformationDebugger": true,
            "tenant": "3d1a315f-a282vvvvvvvvvvvvvvvvvvvv",
            "usePublicURLFromServer": true
        }
    ]
 
A question I have is how to tell the launch where to save the API tables/pages. 
I see that "startupObjectId": 22, seems to tell where it goes. This is confusing as I don't now where to save my API and pages.
 
Thans for any help you can give
,
 
 
 
 
 
Categories:
  • Suggested answer
    Saurav.Dhyani Profile Picture
    Saurav.Dhyani 17,965 Super User 2024 Season 2 on at
    Unknown error when publishing custom API
    Hi,
     
    It seems you are trying to publish app in an Evaluation company which comes with an expiry date.
     
    Try these steps -
    1. Delete company Cronus USA from company's page.
    2. Create a new company using company wizard from company's page. (you can choose option to add demo data in new company)
    3. Then try to publish your extension.
     
    If you still want to keep company, then
    1. you can build the extension in VS Code Using CTRL + B.
    2. Once you see extension (.app) file then you can go to extension management page and install extension using wizard. 
     
    This will not generate error.
    Remember - while publishing from extension management page, the version of app should be greater than already installed app.
     
     
    Regards,
    Saurav Dhyani
     
     
  • YUN ZHU Profile Picture
    YUN ZHU 73,696 Super User 2024 Season 2 on at
    Unknown error when publishing custom API
    Please check your permissions. It looks like the ID you used to publish the extension does not have installation permissions in BC.
    Another thing to confirm is whether you are using a trial environment. If the period has expired, you will not be able to publish the extension. More details:
     
    The API page cannot be opened directly from BC, it is saved in the database.
    You can test it through tools such as Postman.
    For example,
     
     
    Hope this helps.
    Thanks.
    ZHU

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,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans