DataClassification & Caption Field property

Hello Experts,

Can I get your expert comment on Data Classification and Caption property?

  1. DataClassification what value should I use while creating a new field? Do I need to leave as default value like ToBeClassified?

  2. Is “ToBeClassified” going to be removed by MS??

  3. Does Caption property is mandatory at table level? if so why it is not showing error or suggestion? If not then where you recommend to define this property while creating the field?

field(21; “Barcode”; Code[20])
{
DataClassification = ToBeClassified;
Caption = ‘Barcode’;
}

Thank you

Hi Devesh,

“ToBeClassified” just means that YOU need to classify the new field, Microsoft will not remove this for you, if that’s what you mean. Check here for the options: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-classifying-data -

And yes Caption is mandatory, you just need to enter it when you created the field. It will not give you recommendations on what to call the caption.

Once again a big thank you to Erik. You have cleared my doubt. I will go through with suggested link.

If you define the caption on the table, you don’t have to define it on the page. In fact, it is best practice to define the caption at the table level. I don’t think it is mandatory to have a caption, but it IS best practice, you should always do it so that it is possible to create translations.

DataClassification is only mandatory, if you have enabled the AppSourceCop analyzer:

https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/analyzers/appsourcecop-as0016-dataclassificationmustbespecified

right, makes sense. It should be mandatory in my opinion. I never get the error though because I always define a caption [emoticon:c4563cd7d5574777a71c318021cbbcc8]