Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Answered

Is possible to update a resources Craft ID via Business Central API

(0) ShareShare
ReportReport
Posted on by 5

Using the api.businesscentral.dynamics.com/.../{{TenantID}}/{{Environment Name}}/ODataV4/ API, is there a way to do a patch or post for CRAFT ID on a resource?  I am working on a requirement to implement and was told by another consultant that the craft id filed can only be populated on creation of a resource.  However, I need to be able to update this field as well and would like any assistance with the query.

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,748 Super User 2024 Season 1 on at
    RE: Is possible to update a resources Craft ID via Business Central API

    The best way to handle this would than be to change the validation of the craft ID field so the validation with the pop-up only runs if GUI is allowed. There is a specific function in AL to control this.

    learn.microsoft.com/.../system-guiallowed-method

  • sj1906 Profile Picture
    sj1906 5 on at
    RE: Is possible to update a resources Craft ID via Business Central API

    I already have a custom API and this is the field under the Resource Card.  But that wasn't my question, here is what I was told about this field, and I am asking is there a way to make an update (eg not just create the Resource record) -- "While updating resource details please do not update craft id if already assign any value because on craft id field there is standard validation that raise popup to ask from user yes or no and in API’s client callbacks are not supported, and we can not skip standard validations so if you want to update craft id of already assigned then it is possible only in business central directly on resource card."

    pastedimage1682538396232v1.png

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,748 Super User 2024 Season 1 on at
    RE: Is possible to update a resources Craft ID via Business Central API

    I do not think that craft id is a standard field in Business Central. So if you have that field customized in your installation you will need to create a custom API in order to work with that field.

    Please refer to this documentation on how to customize API in Business Central.

    learn.microsoft.com/.../devenv-develop-custom-api

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 Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans