# Entwickler-Dokumentation

BFN Core stellt zentrale Basisfunktionen für weitere BFN-Erweiterungen bereit.

Diese Seite bündelt die wichtigsten Erweiterungspunkte für Entwickler.

### Erweiterungspunkte

#### API, HTTP und Logging

{% code title="codeunit BFN Core Http Services" %}

```al
OnAfterSetCreateApiLog(BFNCoreServiceType: Enum "BFN Core Service Type"; var CreateApiLog: Boolean)
OnBeforeCreateApiLogHttpStatus(URL: Text; EndPoint: Text; BFNCoreServiceType: Integer; HttpRequestType: Integer; Request: Text; Response: Text; IsError: Boolean; var IsHandled: Boolean; var Id: Guid; HttpStatus: Integer)
OnBeforeSetErrorApiLogGuid(Id: Guid; var IsHandled: Boolean)
```

{% endcode %}

{% code title="table BFN Core API Log" %}

```al
OnBeforeTryAgain(var BFNCoreApiLog: Record "BFN Core API Log"; var IsHandeld: Boolean; var Response: Text)
OnAfterTryAgain(var BFNCoreApiLog: Record "BFN Core API Log"; var Response: Text)
```

{% endcode %}

{% code title="codeunit BFN Core Json Services" %}

```al
OnBeforeInsertOrModifySWRecordRef(RecordRef: RecordRef; JObject: JsonObject)
OnAfterInsertOrModifySWRecordRef(RecordRef: RecordRef; JObject: JsonObject)
```

{% endcode %}

#### Lizenzierung

{% code title="codeunit BFN Core License Services" %}

```al
OnAfterSetLicenseResultModule(ModuleId: Guid; Paramter: Boolean; LicensedTo: Date; TempFunctionId: Text)
OnBeforeJObjectWriteToJArrayText(var JObject: JsonObject; var ModuleInfo: ModuleInfo; ExtensionFunctionId: Text)
OnBeforeJObjWriteToJArrToSetUsedLicences(var UsedLicences: Integer; var ModuleInfo: ModuleInfo; ExtensionFunctionId: Text; var IsHandled: Boolean)
```

{% endcode %}

#### Job Queue

{% code title="codeunit BFN Core Job Queue Restart" %}

```al
OnBeforeRestartJobQueueEntry(var JobQueueEntry: Record "Job Queue Entry"; var IsHandled: Boolean)
```

{% endcode %}

#### Stammdaten und Belege

{% code title="table BFN Core Voucher" %}

```al
OnBeforeFillBFNCode(var BFNSWVoucher2: Record "BFN Core Voucher"; var IsHandled: Boolean)
```

{% endcode %}

{% code title="table Item" %}

```al
BFNCoreOnBeforeInsertBFNCreateItemVariant(ItemAttribute: Record "Item Attribute"; ItemAttributeValue: Record "Item Attribute Value"; ItemVariant: Record "Item Variant")
BFNCoreOnAfterBFNCreateItemVariant(ItemAttribute: Record "Item Attribute"; ItemAttributeValue: Record "Item Attribute Value"; var ItemVariant: Record "Item Variant")
```

{% endcode %}

{% code title="table Sales Invoice Line" %}

```al
BFNOnBeforeBFNCoreAnonymizeSalesInvoiceLine(var SalesInvoiceLine: Record "Sales Invoice Line"; Cont: Record Contact; var IsHandled: Boolean)
BFNOnAfterBFNCoreAnonymizeSalesInvoiceLine(var SalesInvoiceLine: Record "Sales Invoice Line"; Cont: Record Contact)
```

{% endcode %}

{% code title="table Sales Line" %}

```al
BFNOnBeforeBFNCoreAnonymizeSalesLine(var SalesLine: Record "Sales Line"; Cont: Record Contact; var IsHandled: Boolean)
BFNOnAfterBFNCoreAnonymizeSalesLine(var SalesLine: Record "Sales Line"; Cont: Record Contact)
```

{% endcode %}

{% code title="table Sales Shipment Line" %}

```al
BFNOnBeforeBFNCoreAnonymizeSalesShipmentLine(var SalesShipmentLine: Record "Sales Shipment Line"; Cont: Record Contact; var IsHandled: Boolean)
BFNOnAfterBFNCoreAnonymizeSalesShipmentLine(var SalesShipmentLine: Record "Sales Shipment Line"; Cont: Record Contact)
```

{% endcode %}

### Veraltet

{% hint style="warning" %}
Dieses Event ist veraltet. Es sollte nur noch für Bestandslösungen genutzt werden.
{% endhint %}

{% code title="codeunit BFN Core License Services" %}

```al
OnAfterSetLicenseResult(Paramter: Boolean; LicensedTo: Date; TempFunctionId: Text)
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bfn-it.de/documentation/bccore/core/entwickler-dokumentation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
