
XML Schemas

enumextension 70714601 "NVXEB NCEX XML Schema Type" extends "NCEX XML Schema Type"
{
value(70714600; "NVXEB ebInterface")
{
Caption = 'ebInterface', Comment = 'DEU="ebInterface"';
}
}
[EventSubscriber(ObjectType::Codeunit, Codeunit::"NCEX XML Schema Mgt.", 'OnGetMultipleRootRecordsAllowed', '', false, false)]
local procedure OnGetMultipleRootRecordsAllowed(SchemaType: Enum "NCEX XML Schema Type"; var MultipleRootRecordsAllowed: Boolean)
begin
if (SchemaType = SchemaType::"NVXEB ebInterface") then
MultipleRootRecordsAllowed := false;
end;
if (SchemaType = SchemaType::"NVXEB ebInterface") thenThis if condition determines for which XML schema type the code should be executed and must not be omitted under any circumstances.
The value must match the added value from the enumextension.
action(NVXEBXMLSchemasAction)
{
ApplicationArea = All;
Caption = 'XML Schemas', Comment = 'DEU="XML-Schemata"';
ToolTip = 'View or set up the ebInterface XML Schemas.', Comment = 'DEU="Zeigt die Einstellungen der ebInterface XML-Schemata an, oder richtet sie ein."';
Image = XMLSetup;
trigger OnAction()
var
NCEXXMLSchemaMgt: Codeunit "NCEX XML Schema Mgt.";
begin
NCEXXMLSchemaMgt.OpenXMLSchemas("NCEX XML Schema Type"::"NVXEB ebInterface");
end;
}

procedure CreateXMLFile(SchemaType: Enum "NCEX XML Schema Type"; SchemaCode: Code[20]; RootRecordRef: RecordRef; var TempBlob: Codeunit "Temp Blob"; NCEXXMLExecuteAction: enum "NCEX XML Execute Action"): Boolean
| Type | Name | Description |
|---|---|---|
| NCEX XML Schema Type | SchemaType | Specifies the schema type. |
| Code | SchemaCode | Specifies the schema code. |
| RecordRef | RootRecordRef | Specifies the table and the record(s) for the root line of the schema. |
| Temp Blob | TempBlob | The Temp Blob in which the created file is returned. |
| NCEX XML Execute Action | NCEXXMLExecuteAction | Specifies which action should be performed. |
| Type | Description |
|---|---|
| Boolean | True if the file was created or checked. |
[EventSubscriber(ObjectType::Codeunit, Codeunit::"NCEX XML Schema Mgt.", 'OnGetAdditionalVariables', '', false, false)]
local procedure OnGetAdditionalVariables(SchemaType: Enum "NCEX XML Schema Type"; var TempNCEXXMLSchemaVariable: Record "NCEX XML Schema Variable" temporary)
var
NCEXXMLSchemaMgt: Codeunit "NCEX XML Schema Mgt.";
NextPositionNo: Integer;
DETAILS_HEADERTxt: Label 'Optional pretext for all details.', Comment = 'DEU="Optionaler Vortext für alle Details."';
DETAILS_FOOTERTxt: Label 'Optional posttext for all details.', Comment = 'DEU="Optionaler Nachtext für alle Details."';
begin
if (SchemaType <> SchemaType::"NVXEB ebInterface") then
exit;
NCEXXMLSchemaMgt.AddAdditionalVariable(TempNCEXXMLSchemaVariable, NextPositionNo, '[DETAILS_HEADER]', DETAILS_HEADERTxt, false);
NCEXXMLSchemaMgt.AddAdditionalVariable(TempNCEXXMLSchemaVariable, NextPositionNo, '[DETAILS_FOOTER]', DETAILS_FOOTERTxt, false);
end;

[EventSubscriber(ObjectType::Codeunit, Codeunit::"NCEX XML Schema Mgt.", 'OnGetAdditionalVariableValue', '', false, false)]
local procedure OnGetAdditionalVariableValue(SchemaType: Enum "NCEX XML Schema Type"; Variable: Code[20]; var VariableValue: Text; CurrentRecordRef: RecordRef; var SetVariable: Boolean)
var
SalesInvoiceHeader: Record "Sales Invoice Header";
CRLF: Text[2];
begin
if (SchemaType <> SchemaType::"NVXEB ebInterface") then
exit;
case Variable of
'[DETAILS_HEADER]':
case CurrentRecordRef.Number of
Database::"Sales Invoice Header":
begin
SetVariable := true;
CurrentRecordRef.SetTable(SalesInvoiceHeader);
CRLF[1] := 13;
CRLF[2] := 10;
VariableValue := 'Hello Header!' + CRLF + SalesInvoiceHeader."Posting Description";
end;
end;
'[DETAILS_FOOTER]':
case CurrentRecordRef.Number of
Database::"Sales Invoice Header":
begin
SetVariable := true;
CurrentRecordRef.SetTable(SalesInvoiceHeader);
VariableValue := 'Hello Footer!'
end;
end;
end;
end;
| tabledata | Use permission | Setup permission |
|---|---|---|
| "NCEX XML Schema" | R | RIMD |
| "NCEX XML Schema Comment" | R | RIMD |
| "NCEX XML Schema Change Log" | R | RIMD |
| "NCEX XML Schema Line" | R | RIMD |
| "NCEX XML Schema Line Filter" | R | RIMD |

![]() | E-Document - ebInterface Create and send e-invoices in accordance with the Austrian standard. More information ![]() |