web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Create service type item

(0) ShareShare
ReportReport
Posted on by 25

Hi

I am trying to automate one scenario in which I should create a service item.

There is library function where we can just use inbuilt function.

procedure createServiceItem()

    var

        Item: Record Item;

    begin

        libraryItem.CreateServiceTypeItem(Item);

    end;

But how I can store this value in any variable? Or can store this value in the database?

  • Suggested answer
    Andy Sather Profile Picture
    Microsoft Employee on at

    Hello  - We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist.  If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    dynamicsuser.net/.../developers

    I will open this up to the community in case they have something to add.

  • Suggested answer
    Suresh Kulla Profile Picture
    50,280 Super User 2026 Season 1 on at

    What value do you want to store? did you try the item templates to create service items?

  • Pankaj0012 Profile Picture
    25 on at

    I want to store the value like serviceitem:= libraryinventory.createservicetypeitem(item);

    Here I have used inbuilt function to create the service item.

    And I want to use this value like

    Testpage.item.setvalue(serviceitem);

    Or

    Testpage.item.setvalue(createserviceitem);

    But I am getting error in all scenarios

  • Suggested answer
    JAngle Profile Picture
    159 on at

    Have you populated the item variable with values? Creating an item of type service is just one field. Are the errors relating to other missing pieces of data?

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 674 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 362 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 359 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans