> ## Documentation Index
> Fetch the complete documentation index at: https://human-resource-docs.ha-consultancy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Install the Extension

> Install BC Human Resource on a Business Central tenant via AppSource, sandbox sideload, or PowerShell — prerequisites, install steps, and verification.

## Prerequisites

* A Business Central tenant on **runtime 15.0** (platform 25.2) or later — SaaS or on-prem.
* The **HA BC Base Extension** (`5dea1714-598f-45ee-8737-d68ad449291f`) installed first. The HR extension depends on it.
* A user with the **D365 Extension Management** permission set (or equivalent BC admin role).
* For developer / sandbox installs: AL Language extension in VS Code, or the `bc-tools` PowerShell module.

## Install paths

### A. AppSource (production tenants)

Once published, the extension appears in **Extension Marketplace** inside BC. Search for *Business Central Human Resource* (publisher: Hamwi Computer Software) and click **Install**. Microsoft handles dependency resolution and runs `OnInstallAppPerCompany` automatically the first time the extension touches each company.

### B. Sideload to a sandbox

1. Build the `.app` file in VS Code (`Ctrl+Shift+B` on the AL project), or take the prebuilt one from `BC-Human-Resource-AL/Hamwi Computer Software_Business Central Human Resource_*.app`.
2. In BC, search for **Extension Management**.
3. **Upload extension** → pick the `.app` → tick *Accept terms of use* → **Deploy**.
4. Wait for the upload to finish (typically under a minute on SaaS).

### C. PowerShell / partner pipeline

```powershell theme={null}
Publish-NAVApp -ServerInstance BC -Path .\Hamwi*HumanResource*.app -SkipVerification
Sync-NAVApp -ServerInstance BC -Name "Business Central Human Resource" -Version <ver>
Install-NAVApp -ServerInstance BC -Name "Business Central Human Resource" -Version <ver>
```

<Note>On SaaS use `Set-NAVServerConfiguration` / the AppSource pipeline rather than direct cmdlets.</Note>

## What happens on first install

The install codeunit (`Cod70003100 Install Codeunit HAC`) runs `OnInstallAppPerCompany` for each company in the tenant. It:

1. Creates the **`EMPJNL`** general journal template and the **`DEFAULT`** batch under it. These are used by the Employee Journal.
2. Inserts the default **salary types**: Basic Salary, Transportation Allowances, Travel Allowances, Communication Allowances, Accommodation Allowances. You can rename or delete them later.
3. Creates every required **No. Series** with a `No. Series Line` so document inserts work immediately. Series codes created: `SHFT`, `SLRY-PKG`, `SLRY`, `LV-TYP`, `LV`, `LV-RULE`, `LOAN`, `LOAN-INST`, `OVERTIME-RULE`, `EMP-POS`, `EOS`, `SOC-INS`, `HR-LET`, `HR-DOC`, `ADV-SLRY`, `ANN`. Each series starts at `<CODE>00001` and increments by 1.

<Tip>**Upgrading from an earlier internal build?** The upgrade codeunit (`Cod70003101 Upgrade Codeunit HAC`) runs `OnUpgradePerCompany` and calls the same setup, so previously-missing series are created automatically.</Tip>

## Verifying the install

After the upload finishes:

1. Search for **HR General Setup** (Tell-Me, Alt+Q). The page should open with `Overtime Hour Rate Calculation Type` defaulted to *Uniform Month Length (30 Days Each)*.
2. Search for **Departments**. The page should open empty (or with whatever you seeded). No errors.
3. Search for **HR Demo Data Generator** — it's available in *Administration*. You'll use this in the next step.

If you see *"The No. Series LOAN does not exist"* on any HR page, the install codeunit didn't run. Run it manually:

* In Object Designer / VS Code: run codeunit **70003100 Install Codeunit HAC**.
* Or run the **HR Demo Data Generator** action below — it self-heals the No. Series before seeding.

## Permission assignment

The extension ships a permission set named **`Human Resource HAC`**. Assign it to any user who should manage HR data:

1. Search for **Permission Sets**.
2. Filter for `Human Resource HAC`.
3. Add it to your HR user's permission set list, or to a permission set group used by HR roles.

The permission set grants `RIMD` on every HR-specific table in the extension. It does not grant standard BC employee permissions — assign **D365 BUS PREMIUM** (or one of the standard HR roles) alongside it.

## Uninstall

In **Extension Management**, select the row and click **Uninstall**. BC asks whether to keep the data:

* **Keep data**: tables are preserved. Re-installing the same version restores everything.
* **Delete data**: every record in the HR-specific tables is removed. Standard BC tables (Employee, etc.) are untouched even when fields added by this extension are dropped — Microsoft handles that schema cleanup.

## Next steps

<CardGroup cols={2}>
  <Card title="Seed demo data" icon="seedling" href="/getting-started/seed-demo-data">
    Populate a fresh tenant with starter records in one click.
  </Card>

  <Card title="Configure HR" icon="gear" href="/getting-started/configure">
    First-time configuration walk-through.
  </Card>
</CardGroup>
