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

Community site session details

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

Make field mandatory for configuration package import

(2) ShareShare
ReportReport
Posted on by 66

Hi All,

I am designing a table that will be populated primarily by using a configuration package (Rapidstart). This will be done regularly, not just for the initial set of data. Some of its fields should not allow blank values, but I have not been able to find a way to enforce this when importing data. I would like the configuration package to throw an error if the mandatory fields are blank in the package data. (Currently my package loads the blank values without error). Does anyone know of a way to achieve this? Or should I look at an alternatives such as XMLPorts?

I have tried doing the following in the table's definition :

- NotBlank = true : but this is only respected by pages

- Put Testfield() in the fields' OnValidate() trigger : but this does not work because when the field's value is empty, OnValidate() is not called.

- Check the fields' values in the table's OnInsert() and OnModify() trigger : but this does not work because on the initial insert, the fields' values are not yet populated, so are legitimately blank. This method can work with inserts from the page, by using DelayedInsert, but DelayedInsert is not available for inserting data via a configuration package.

Perhaps I've missed something.

Thank you in advance.

Chris

I have the same question (0)
  • CU30051015-1 Profile Picture
    8 on at
    Make field mandatory for configuration package import
    Hi.
     
    In the end, were you able to achieve this? I'm currently looking to do the same. 
     
  • Chris Greenwood Profile Picture
    66 on at
    RE: Make field mandatory for configuration package import

    Thanks a lot Josh for your suggestion. I gave it a try but I found that to select the "mandatory" option I have to provide a default value.

    Unfortunately in my case I cannot supply default values (the fields are "Start Date" and "End Date" and it doesn't make sense to default them).

  • Suggested answer
    JAngle Profile Picture
    115 on at
    RE: Make field mandatory for configuration package import

    Perhaps a configuration template may help. In there you can specify if a field is mandatory or not. You can even preset some values.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

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

#1
Sumit Singh Profile Picture

Sumit Singh 3,055

#2
Sohail Ahmed Profile Picture

Sohail Ahmed 2,682 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 2,209 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans