I found the primary key of some field is set NotBlank to . But in general, the primary is set Notblank to Yes? why?
Refer to the Application Developer’s Guide and the C/AL Guide for more information on this property.
Hi Jan,pls look at the below, which is copyed from the Application Designed Guideline. But the field “No.” in vendor/customer table is set Notblank to . You can check it in Navision V3.6 Mandatory Primary Key As default, set the property NotBlank=Yes on the primary key fields in a table. No other fields in a table should have this property.
THere are two reasons one is because of Rename the other because fo deleting closed records. 1/ It is not possible to rename a field from to any other value. Thus when the primary key of a Record will be used in a look-up it must not be blank, otherwise you will have problems later if you try to rename. 2/ It is possible to delete Primary cards (Item, G/L etc.) once all entries are closed (and some other conditions). Once the Card is deleted, all the existing entries are set to point to a blank record to maintain consistancy. If a blank record is allowed, then it would not be possible to delete records. As to the difference between properties and code. If you want to use the No. Series functionality to set numbers, then you must allow the creation of a blank record, otherwise the code will not be able to be called.