Skip to Content

C# language

Adding users to a group

In order to enable a process to add a user or users to a specific system group (for example, to manage the role model), enter the following expression: using System;using System.Collections.Generic;using System.Linq;using Comindware.Data.Entity;using Comindware.TeamNetwork.Api.Data.UserCommands;using Comindware.TeamNetwork.Api.Data; class Scri... Read More


Deleting a related object when a condition is met

In order to delete the associated object in the context of a process if a certain condition is met (in this article the condition is the following: the value in the attribute with the data type "Number" in the associated object is zero), enter the following expression: using System;using System.Collections.Generic;using System.Linq;using Comin... Read More


Exporting Selected Records from a Custom Table

This script is designed to download selected records from the table, taking into account user settings. That is, the user selects the columns and records that should be uploaded to Excel. Records are selected with a checkmark in the leftmost column, and columns are configured through the "My settings"-> "Customize display" button. The script wor... Read More


Navigating to the object from the storefront widget

In order to be able to switch from the product card in the storefront widget to the object form, enter the following expression: using System; using System.Collections.Generic;using System.Linq;using Comindware.Data.Entity;using Comindware.TeamNetwork.Api.Data.UserCommands;using Comindware.TeamNetwork.Api.Data; class Script{    public static U... Read More


Uploading a file from a local folder

To add a file from a local folder on your computer to an attribute with the “Document” data type, enter the following expression: using System; using System.Collections.Generic; using System.Linq; using Comindware.Data.Entity; using Comindware.TeamNetwork.Api.Data.UserCommands; using Comindware.TeamNetwork.Api.Data; using System.IO;   class Sc... Read More


Uploading attachments to a local folder

To save the attached file(s) from an attribute with the "Document" data type to a local folder, enter the following expression: using System; using System.Collections.Generic; using System.Linq; using Comindware.Data.Entity; using Comindware.TeamNetwork.Api.Data.UserCommands; using Comindware.TeamNetwork.Api.Data; using System.IO;   class Scri... Read More