# LoadInfoFromCVR

## <span class="mw-headline" id="bkmrk-what-it-does-1">What it does</span>

A codeunit that does a lookup via danish CVR register and updates the given fields of the record.

Only the configurations that are set will be updated, allowing for fetching of specific fields.

## <span class="mw-headline" id="bkmrk-first-setup-1">First setup</span>

Add a status action and set the codeunit Classname to: **dk.tempusserva.codeunit.common.LoadInfoFromCVR**

Set the following entity configurations

- **LoadInfoFromCVR.LookupField** Field SYSTEMNAME containing the CVR to be looked up (required)
- **LoadInfoFromCVR.NameField** Field SYSTEMNAME for the field to be populated with the name of the company
- **LoadInfoFromCVR.AddressField** Field SYSTEMNAME for the field to be populated with the streetname and number of the company
- **LoadInfoFromCVR.PostalcodeField** Field SYSTEMNAME for the field to be populated with the zip/postal code of the company
- **LoadInfoFromCVR.CityField** Field SYSTEMNAME for the field to be populated with the cityname of the company
- **LoadInfoFromCVR.EmailField** Field SYSTEMNAME for the field to be populated with the email of the company
- **LoadInfoFromCVR.PhoneField** Field SYSTEMNAME for the field to be populated with the phonenumber of the company
- **LoadInfoFromCVR.FaxField** Field SYSTEMNAME for the field to be populated with the fax of the company
- **LoadInfoFromCVR.EmployeeCountField** Field SYSTEMNAME for the field to be populated with the employee count of the company
- **LoadInfoFromCVR.IndustryCodeField** Field SYSTEMNAME for the field to be populated with the industry code of the company
- **LoadInfoFromCVR.CompanyCodeField** Field SYSTEMNAME for the field to be populated with the company type code of the company

## <span class="mw-headline" id="bkmrk-how-to-invoke-1">How to invoke</span>

<span class="mw-headline">\[Steps to enable codeunit\]</span>

### <span class="mw-headline">Options</span>

<span class="mw-headline">\[Optional options, that can be set at runtime, eg. url-parameters\]</span>

## <span class="mw-headline" id="bkmrk-configuration-1">Configuration</span>

<span class="mw-headline">\[All possible configurations and where to edit them\]</span>

## <span class="mw-headline" id="bkmrk-developer-info-1">Developer info</span>

- <span class="mw-headline">Type: [CodeunitFormevents](https://docs.tsnocode.com/books/codeunit-reference/chapter/formevents)</span>
- <span class="mw-headline">Security: \[eg. requires admin or session\]</span>
- <span class="mw-headline">Classpath: dk.tempusserva.codeunit.common.LoadInfoFromCVR</span>