Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

General way to add field customization to entities in CRS is to extend entities by EAV fields support. Now EAV fields are supported for following entities:

  • Actors module - Actor;

  • Financial module - SalesOrder, SalesOrderQuote;

  • Scheduling module - CalendarTaskEntity

In this document is described how to manage EAV fields.

Set/clear EAV fieds

Each entity which supports EAV fields have Create/Update API endpoints/commands.

For example Actors may be created by using {host_url}/api/actors/Actor/CreateActor URL and updated by using {host_url}/api/actors/Actor/UpdateActor URL

Each of these commands contains a collection of entity-specific model updates (named ModelUpdates) and there are set of EAV-field related model updates that may be used for set/clear of EAV fields. These model updates need to be added to ModelUpdates collection. EAV field type’s kind determines which model update need to be used to set specific field.

Model Updates

SetBooleanEavValueModelUpdate

export interface ISetBooleanEavValueModelUpdate {
    fieldSystemName: string;
    value: boolean;
}

SetDateTimeEavValueModelUpdate

export interface ISetDateTimeEavValueModelUpdate {
    fieldSystemName: string;
    value: Date;
}

SetDecimalEavValueModelUpdate

export interface ISetDecimalEavValueModelUpdate {
    fieldSystemName: string;
    value: number;
}

SetEavCatalogSingleValueModelUpdate

export interface ISetEavCatalogSingleValueModelUpdate {
    catalogSingleValueId: number;
    fieldSystemName: string;
}

SetEntityReferenceEavValueModelUpdate

export interface ISetEntityReferenceEavValueModelUpdate {
    fieldSystemName: string;
    items: IKeyValuePair<number, string>[];
}

SetIntEavValueModelUpdate

export interface ISetIntEavValueModelUpdate {
    fieldSystemName: string;
    value: number;
}

SetMemoEavFieldModelUpdate

export interface ISetMemoEavFieldModelUpdate {
    fieldSystemName: string;
    value: string;
}

SetOptionsEavValueModelUpdate

export interface ISetOptionsEavValueModelUpdate {
    fieldSystemName: string;
    value: number;
}

SetStringEavValueModelUpdate

export interface ISetStringEavValueModelUpdate {
    fieldSystemName: string;
    value: string;
}

SetUrlEavValueModelUpdate

export interface ISetUrlEavValueModelUpdate {
    fieldSystemName: string;
    value: string;
}

There are set

  • No labels