Для того, чтобы скопировать запись, создайте в текущем шаблоне записи Операцию типа Скрипт и введите следующее выражение:
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 UserCommandResult Main(UserCommandContext userCommandContext, Comindware.Entities entities) { foreach (var objectId in userCommandContext.ObjectIds) {
Api.TeamNetwork.ObjectService.Clone(objectId,null, true); } var result = new UserCommandResult { Success = true, Commited = true, ResultType = UserCommandResultType.DataChange, Messages = new[] { new UserCommandMessage { Severity = SeverityLevel.Normal, Text = "Запись скопирована" } } };
return result; } }
Номер Статьи: 1080
Размещено: Wed, Feb 26, 2020
Последнее обновление: Thu, Nov 7, 2024