Requirementà Create a new financial dimension with values linked to new table.
Solutionàfollow the below steps:
1.Create a new table example AVI_ServiceType.
1.Create a new table example AVI_ServiceType.
2.Create fields in table as Code and description in this example.
3.Create a new form using this table for creating new record.
4. Create a view name must be DimAttribute[entityName] .example .DimAttributeServiceType.
5.Root datasource of view must name as BakingEntity that point your entity table
6.View must contain the following fields
Keyà recId of backingEntity must be int64.
Valueà field Code of the table backing data source.
Name à field Description of the table backing data source .
Override the delete method of table with following code.
Public void delete()
{
If(!DimensionValidation::canDeleteEntityValue(this))
{
Throw error(strfmt(“@SYS134392”,this.code));
{
DimensionAttributeValue::UpdateForEntityValueDelete(this);
Super();
}
Override the renamePrimaryKey method of table with following code.
Public void renamePrimaryKey()
{
Super();
DimensionStorage::syncRenamedValue(this);
}
In order to clear the caches and have the new backing entity appear immediately, execute the
following line of code within a job:
static void Job1(Args _args)
{
DimensionCache::clearAllScopes();
info(‘ok’);
}
No comments:
Post a Comment