ICustomObjectService Interface

Provides functionality to add, search and manipulate custom objects and their definition Syntax.

Namespace: bcpDevKit
Assembly: bcpDevKit.dll

Syntax

public interface ICustomObjectService

Methods

Type

Name

Description

../../../_images/method.ico CustomObject

AddCustomObject(string definitionName, string name)

Adds custom entities to the package and creates their definitions if required. definitionName is the singular name of the custom object (e.g. Person). Name should be unique.

../../../_images/method.ico CustomObject

GetCustomObject(string definitionName, string name)

Returns an entity of the specified definition if it exists.

Remarks

AddCustomObject handles the creation of the custom object definition and of the custom object itself. It handles the situation when the definition has to be created in the package or when an entity with the same name is already there.

Examples

Adds a CustomObject “Dragonball”

var definition = bcpService.EntitiesTable.CustomObjectWrapper.AddCustomObjectDefinition("Dragonball", "Dragonballs");
definition.SetIcon(@".\Dragon-Ball-icon.ico");
var customObject = bcpService.CustomObjectService.AddCustomObject("Dragonball", "4");
Click for downloading the Dragonball icon