### Install Soneta Platform Developer Templates
Source: https://context7.com/soneta/soneta.platform.developer/llms.txt
Installs the Soneta Platform Developer NuGet package as a global dotnet new template. Use 'uninstall' if an update is required.
```bash
dotnet new install Soneta.Platform.Developer
```
```bash
dotnet new list --tag Soneta
```
```bash
dotnet new uninstall Soneta.Platform.Developer
```
--------------------------------
### Example .csproj using Soneta.Sdk
Source: https://context7.com/soneta/soneta.platform.developer/llms.txt
A sample project file demonstrating how to use the Soneta.Sdk. Ensure the TargetFramework is set using the $(SonetaTargetFramework) property defined in Directory.Build.props.
```xml
$(SonetaTargetFramework)
```
--------------------------------
### Example Business Module XML Structure
Source: https://context7.com/soneta/soneta.platform.developer/llms.txt
This XML defines a 'Zamowienia' module with a 'Zamowienie' table and its columns. It specifies the module's name, namespace, and version.
```xml
```
--------------------------------
### XML IntelliSense Schema Configuration (VS Code)
Source: https://context7.com/soneta/soneta.platform.developer/llms.txt
Example XML namespaces required for Soneta's XML files (.business.xml, .pageform.xml, .viewform.xml) to enable IntelliSense in Visual Studio Code with the XML Complete extension.
```xml
```
--------------------------------
### Soneta Worker with Parameters and Actions (C#)
Source: https://context7.com/soneta/soneta.platform.developer/llms.txt
Example of a Soneta worker class in C# that includes parameters and a defined action. The action is configured to run with session confirmation and a progress bar.
```csharp
// Wygenerowana klasa: ArchiwizacjaWorker.cs (z parametrami)
using System;
using Soneta.Business;
using Soneta.Business.UI;
using MojDodatek;
[assembly: Worker(typeof(ArchiwizacjaWorker), typeof(Soneta.CRM.Kontrahent))]
namespace MojDodatek
{
public class ArchiwizacjaWorker
{
[Context]
public ArchiwizacjaWorkerParams @params { get; set; }
// Akcja wywoływana w kontekście pojedynczej sesji z potwierdzeniem i paskiem postępu
[Action("ArchiwizacjaWorker/ToDo",
Mode = ActionMode.SingleSession | ActionMode.ConfirmSave | ActionMode.Progress)]
public MessageBoxInformation ToDo()
{
return new MessageBoxInformation("Potwierdzasz wykonanie operacji ?")
{
Text = "Opis operacji",
YesHandler = () =>
{
using (var t = @params.Session.Logout(true))
{
// Tutaj logika archiwizacji korzystająca z parametrów
t.Commit();
}
return "Operacja została zakończona";
},
NoHandler = () => "Operacja przerwana"
};
}
}
// Klasa parametrów workera (generowana gdy worker-params=true)
public class ArchiwizacjaWorkerParams : ContextBase
{
public ArchiwizacjaWorkerParams(Context context) : base(context) { }
public string Parametr1 { get; set; }
}
}
```
--------------------------------
### Tworzenie nowej solucji dodatku (domyślne ustawienia)
Source: https://github.com/soneta/soneta.platform.developer/blob/develop/README.md
Utwórz nową solucję dodatku, używając domyślnego szablonu `soneta-addon`. Spowoduje to utworzenie solucji i projektów zgodnie z nazwą nadrzędnego folderu.
```bash
dotnet new soneta-addon
```
--------------------------------
### List Available Item Templates
Source: https://github.com/soneta/soneta.platform.developer/blob/develop/README.md
Use this command to see all available item templates for Soneta Platform Developer.
```bash
dotnet new soneta-item-businessxml -h
```
--------------------------------
### Tworzenie nowej solucji dodatku (z nazwanym folderem i bez UI)
Source: https://github.com/soneta/soneta.platform.developer/blob/develop/README.md
Utwórz nową solucję dodatku, podając niestandardową nazwę folderu (`-n Tools`) i wyłączając interfejs użytkownika (`-nui`).
```bash
dotnet new soneta-addon -n Tools -nui
```
--------------------------------
### Instalacja szablonu Soneta Platform Developer
Source: https://github.com/soneta/soneta.platform.developer/blob/develop/README.md
Użyj tej komendy, aby zainstalować dodatek Soneta Platform Developer, który zawiera nowe szablony projektów.
```bash
dotnet new -i Soneta.Platform.Developer
```
--------------------------------
### Create Soneta Addon Solution
Source: https://context7.com/soneta/soneta.platform.developer/llms.txt
Scaffolds a complete enova365 addon solution with business logic, UI, and test projects. Use '-n' to specify a name and '--noUI' or '--noTest' to exclude specific projects.
```bash
dotnet new soneta-addon -h
```
```bash
dotnet new soneta-addon
```
```bash
dotnet new soneta-addon -n MojDodatek
```
```bash
dotnet new soneta-addon -n MojDodatek -noUI
```
```bash
dotnet new soneta-addon -n MojDodatek -noTest
```
```bash
dotnet new soneta-addon -n MojDodatek -noUI -noTest
```
--------------------------------
### Create New ViewInfo Class
Source: https://github.com/soneta/soneta.platform.developer/blob/develop/README.md
Creates a custom view class for presenting data in lists and registers the view in the application. If no class name is provided, the project name is used.
```bash
dotnet new soneta-item-viewinfo -h
```
--------------------------------
### Wyświetlanie pomocy dla szablonu soneta-addon
Source: https://github.com/soneta/soneta.platform.developer/blob/develop/README.md
Użyj tej komendy, aby wyświetlić szczegółowe informacje o dostępnych parametrach i opcjach dla szablonu `soneta-addon`.
```bash
dotnet new soneta-addon -h
```
--------------------------------
### Create Soneta Business XML Item
Source: https://context7.com/soneta/soneta.platform.developer/llms.txt
Generates a *.business.xml file for defining enova365 database modules. Requires building the solution at least once before adding the item. Use '--module-name' to specify the module's name.
```bash
dotnet new soneta-item-businessxml -h
```
```bash
dotnet new soneta-item-businessxml --module-name Zamowienia
```
--------------------------------
### Wyświetlanie listy zainstalowanych szablonów
Source: https://github.com/soneta/soneta.platform.developer/blob/develop/README.md
Po zainstalowaniu dodatku, użyj tej komendy, aby sprawdzić listę dostępnych szablonów projektów.
```bash
dotnet new list
```
--------------------------------
### Add Business Module with Default Name
Source: https://context7.com/soneta/soneta.platform.developer/llms.txt
Use 'dotnet new soneta-item-businessxml' to create a new business module. The module name defaults to the project's RootNamespace.
```bash
dotnet new soneta-item-businessxml
```
--------------------------------
### Konfiguracja debugowania w VS Code
Source: https://github.com/soneta/soneta.platform.developer/blob/develop/README.md
Plik `launch.json` konfiguruje środowisko debugowania dla dodatku. Należy ustawić poprawną ścieżkę do pliku wykonywalnego `SonetaExplorer.exe` lub `SonetaServer.exe`.
```json
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug",
"type":"clr",
"request": "launch",
"preLaunchTask": "build",
"program": "C:/Program Files (x86)/Soneta/enova365 15.4.7010.15330/SonetaExplorer.exe",
"args":[],
"windows": {
"args": ["/extpath=${workspaceFolder}/bin/Debug/net46"]},
"console": "internalConsole",
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart"
}
]
}
```
--------------------------------
### Generate soneta-item-viewinfo template
Source: https://context7.com/soneta/soneta.platform.developer/llms.txt
Use this command to generate a C# class inheriting from ViewInfo and a corresponding *.viewform.xml file. Specify parameters like name, table name, description, and priority.
```bash
dotnet new soneta-item-viewinfo \
--viewinfo-name MoiKontrahenci \
--viewinfo-tablename "Soneta.CRM.Kontrahent" \
--viewinfo-description "Lista moich kontrahentów" \
--viewinfo-priority 3000
```
--------------------------------
### Create and Push Git Tag for Release
Source: https://github.com/soneta/soneta.platform.developer/blob/develop/RELEASING.md
Create an annotated tag for the release at the current master branch point and push all tags to the remote repository.
```bash
git tag -a vx.y.z origin/master
git push origin --tags
```
--------------------------------
### Soneta Solution Build Properties (Directory.Build.props)
Source: https://context7.com/soneta/soneta.platform.developer/llms.txt
Defines common MSBuild properties for the entire solution, including package versions and target framework. This file is part of the solution structure generated by the soneta-addon template.
```xml
2510.0.0net8falsefalse2510.0.1.0
```
--------------------------------
### Create New Dashboard Extender
Source: https://github.com/soneta/soneta.platform.developer/blob/develop/README.md
Creates an extender class for dashboards and an XML file describing its appearance. If no extender name is provided, the project name is used.
```bash
dotnet new soneta-item-dashboard -h
```
--------------------------------
### Konfiguracja Intellisense dla plików XML w VS Code
Source: https://github.com/soneta/soneta.platform.developer/blob/develop/README.md
Dodaj te atrybuty do istniejących plików XML (config, business, form.xml), aby umożliwić Intellisense w Visual Studio Code po zainstalowaniu rozszerzenia `Xml Complete`.
```xml
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.enova.pl/schema/form.xsd"
xsi:schemaLocation="http://www.enova.pl/schema/ http://www.enova.pl/schema/form.xsd"
```
--------------------------------
### Visual Studio Code Debug Configuration (launch.json)
Source: https://context7.com/soneta/soneta.platform.developer/llms.txt
Configuration for Visual Studio Code to debug Soneta extensions by attaching to the Soneta process. Requires a pre-configured build task.
```json
// .vscode/launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug",
"type": "clr",
"request": "launch",
"preLaunchTask": "build",
"program": "C:/Program Files (x86)/Soneta/enova365 15.4.7010.15330/SonetaExplorer.exe",
"args": [],
"windows": {
"args": ["/extpath=${workspaceFolder}/bin/Debug/net8"]
},
"console": "internalConsole",
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart"
}
]
}
```
--------------------------------
### Soneta MSBuild SDK Configuration (global.json)
Source: https://context7.com/soneta/soneta.platform.developer/llms.txt
Specifies the required version of the Soneta MSBuild SDK for the solution. This file is automatically generated by the soneta-addon template.
```json
{
"msbuild-sdks": {
"Soneta.Sdk": "1.1.7"
}
}
```
--------------------------------
### Integrate Develop with Master and Push
Source: https://github.com/soneta/soneta.platform.developer/blob/develop/RELEASING.md
Merge the develop branch into the master branch and push the changes to the remote repository.
```bash
git checkout master
git merge develop
git push origin master
```
--------------------------------
### Generate Dashboard Item Template
Source: https://context7.com/soneta/soneta.platform.developer/llms.txt
Use 'dotnet new soneta-item-dashboard' to generate a dashboard extender class and its associated XML configuration. Use the -h flag for help.
```bash
# Wyświetlenie pomocy
dotnet new soneta-item-dashboard -h
# Dodanie dashboardu z własną nazwą, tytułem i priorytetem (w folderze projektu UI)
dotnet new soneta-item-dashboard \
--extender-name Sprzedaz \
--dashboard-caption "Podsumowanie sprzedaży" \
--dashboard-priority 5000
```
--------------------------------
### Create New PageForm Class
Source: https://github.com/soneta/soneta.platform.developer/blob/develop/README.md
Generates a class registered as a worker and an XML file describing the appearance of a tab associated with the class. If no class name is provided, the project name is used.
```bash
dotnet new soneta-item-pageform -h
```
--------------------------------
### Commit and Push Next Version Changes
Source: https://github.com/soneta/soneta.platform.developer/blob/develop/RELEASING.md
Commit the changes for the next version, including the prerelease part, and push to the develop branch.
```bash
git commit -m "Wersja następna: x.y.z+1-prerelease"
git push origin develop
```
--------------------------------
### Konfiguracja domyślnego zadania budowania w VS Code
Source: https://github.com/soneta/soneta.platform.developer/blob/develop/README.md
Plik `tasks.json` jest tworzony, aby skonfigurować domyślne zadanie budowania dla projektu w Visual Studio Code. Użyj F1, aby uzyskać dostęp do opcji konfiguracji zadań.
```json
{
"version": "0.1.0",
"command": "dotnet",
"isShell": true,
"args": [
"build"
],
"tasks": [
{
"taskName": "build",
"args": [
"${entireProject}"
],
"isBuildCommand": true,
"problemMatcher": "$msCompile"
}
]
}
```
--------------------------------
### Create New Worker Class
Source: https://github.com/soneta/soneta.platform.developer/blob/develop/README.md
Generates a custom worker class with a defined action and parameters, including a form. If no worker name is provided, the project name is used.
```bash
dotnet new soneta-item-worker -h
```
--------------------------------
### Generated MoiKontrahenciViewInfo C# class
Source: https://context7.com/soneta/soneta.platform.developer/llms.txt
This C# class is generated by the `soneta-item-viewinfo` template. It defines the view's behavior, including context initialization and view creation, and is registered with `[assembly: FolderView(...)]`.
```csharp
using System;
using System.Linq;
using Soneta.Business;
using Soneta.Business.UI;
using MojDodatek.UI;
[assembly: FolderView("MojDodatek.UI/MoiKontrahenciViewInfo",
Priority = 3000,
Description = "Lista moich kontrahentów",
TableName = "Soneta.CRM.Kontrahent",
ViewType = typeof(MoiKontrahenciViewInfo)
)]
namespace MojDodatek.UI
{
public class MoiKontrahenciViewInfo : ViewInfo
{
public MoiKontrahenciViewInfo()
{
// Powiązanie z plikiem viewform.xml
ResourceName = "MoiKontrahenci";
InitContext += MoiKontrahenciViewInfo_InitContext;
CreateView += MoiKontrahenciViewInfo_CreateView;
}
void MoiKontrahenciViewInfo_InitContext(object sender, ContextEventArgs args) { }
void MoiKontrahenciViewInfo_CreateView(object sender, CreateViewEventArgs args)
{
MoiKontrahenciViewInfo.WParams parameters;
if (!args.Context.Get(out parameters))
return;
args.View = ViewCreate(parameters);
}
public class WParams : ContextBase
{
public WParams(Context context) : base(context) { }
}
protected View ViewCreate(WParams pars)
{
View view = null;
// Tutaj budujemy widok na podstawie parametrów kontekstu
return view;
}
}
}
```
--------------------------------
### Generated MoiKontrahenci.viewform.xml
Source: https://context7.com/soneta/soneta.platform.developer/llms.txt
This XML file defines the layout for the navigation panel list, including filters and grid columns. It is associated with the generated C# ViewInfo class.
```xml
```
--------------------------------
### Create Soneta Worker Without Parameters
Source: https://context7.com/soneta/soneta.platform.developer/llms.txt
Use this command to generate a new Soneta worker without any parameters. Specify the worker name and its data type.
```bash
dotnet new soneta-item-worker \
--workername Raport \
--worker-datatype "Soneta.Handel.DokumentHandlowy" \
--worker-params false
```
--------------------------------
### Page Form XML Configuration (Worker Mode)
Source: https://context7.com/soneta/soneta.platform.developer/llms.txt
This XML file defines the layout for a custom tab named 'Szczegoly' with the caption 'Moje dane' and priority 2000, intended for an object's form.
```xml
```
--------------------------------
### Generate soneta-item-worker template
Source: https://context7.com/soneta/soneta.platform.developer/llms.txt
Use this command to generate a C# worker class registered with `[assembly: Worker(...)]`. The `--worker-params` flag determines if an input parameter form is included.
```bash
dotnet new soneta-item-worker \
--workername Archiwizacja \
--worker-datatype "Soneta.CRM.Kontrahent" \
--worker-params-caption "Parametry archiwizacji" \
--worker-priority 1000
```
--------------------------------
### Generate Page Form Item Template
Source: https://context7.com/soneta/soneta.platform.developer/llms.txt
Use 'dotnet new soneta-item-pageform' to create a C# class and XML file for a custom tab on an enova365 object form. Use '--pageform-register-folder true' to register as a FolderView.
```bash
# Wyświetlenie pomocy
dotnet new soneta-item-pageform -h
# Dodanie zakładki jako Worker (domyślnie) z własną nazwą i tytułem
dotnet new soneta-item-pageform \
--class-name Kontrahent \
--pageform-caption "Moje dane" \
--pageform-pagename Szczegoly \
--pageform-priority 2000
# Dodanie zakładki jako FolderView (widocznej w panelu folderów)
dotnet new soneta-item-pageform \
--class-name Kontrahent \
--pageform-register-folder true \
--pageform-caption "Kontrahenci" \
--pageform-priority 1000
```
--------------------------------
### Commit and Push Changes for Version Update
Source: https://github.com/soneta/soneta.platform.developer/blob/develop/RELEASING.md
Use this command to commit changes related to version updates and push them to the develop branch.
```bash
git commit -m "Wersja x.y.z; SDK ; enova ; vsix "
git push origin develop
```
--------------------------------
### Dashboard Page Form XML Configuration
Source: https://context7.com/soneta/soneta.platform.developer/llms.txt
This XML file defines the layout and appearance of a dashboard tile in enova365. It links to the C# extender class and sets properties like caption and priority.
```xml
```
--------------------------------
### Page Form C# Class (Worker Mode)
Source: https://context7.com/soneta/soneta.platform.developer/llms.txt
This C# class is registered as a Worker, creating a tab on an object's form. It includes context properties for Session and Login.
```csharp
// Wygenerowana klasa (tryb Worker): KontrahentClass.cs
using Soneta.Business;
using Soneta.Business.App;
using MojDodatek.UI;
// Rejestracja jako Worker – zakładka na formularzu obiektu
[assembly: Worker(typeof(KontrahentClass))]
namespace MojDodatek.UI
{
public class KontrahentClass
{
[Context]
public Session Session { get; set; }
[Context]
public Login Login { get; set; }
}
}
```
--------------------------------
### Dashboard Extender C# Class
Source: https://context7.com/soneta/soneta.platform.developer/llms.txt
This C# class is registered as a Worker and implements the IsVisible property. It's used to define dashboard behavior and visibility.
```csharp
// Wygenerowana klasa: SprzedazExtender.cs
using Soneta.Business;
using Soneta.Business.App;
using Soneta.Tools;
using MojDodatek.UI;
[assembly: Worker(typeof(SprzedazExtender))]
namespace MojDodatek.UI
{
public class SprzedazExtender
{
[Context]
public Login Login { get; set; }
public bool IsVisible => true;
}
}
```
--------------------------------
### Soneta Worker Parameter Form Definition (XML)
Source: https://context7.com/soneta/soneta.platform.developer/llms.txt
XML definition for a Soneta worker's parameter form. This file specifies the UI elements and data binding for worker parameters.
```xml
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.