BLACK FRIDAY
From Nov 21
To Dec 1
XXDAYS : XXHRS : XXMIN : XXSEC
SAVE UP TO$3K
Also valid for the
existing customers!
logo
Project
Version

Dynamic Parameter System

Dynamic Parameter System is a system that allows you to add and manage new properties on entity objects at runtime without any code changes. With this system, you can define dynamic propeties on entity objects and perform operations on these objects easily. For example, it can be used for cities, counties, gender, status codes etc.

Check AspNet Boilerplate side of Dynamic Parameter System

Defining

  • Firs of all you need to define input types and entities you want to use with dynamic properties as described here

  • Then go to https://localhost:44302/App/DynamicProperty

  • Add Dynamic Properties that you need

  • Assign Dynamic Properties to your entity

dynamic-properties
  • Then you will be able to use dynamic property for the items of your entity.

You can use DynamicEntityPropertyManager to manager dynamic properties of an entity

Add javascript

<script abp-src="/view-resources/Areas/AppAreaName/Views/Common/_DynamicEntityPropertyManager.js" asp-append-version="true"></script>

Then you can use it to show modal

var _dynamicEntityPropertyManager = new DynamicEntityPropertyManager();

var canShow = _dynamicEntityPropertyManager.canShow('YOURENTITYNAME');//is entity defined and user has related permission to edit dynamic entities
if(canShow){
    _dynamicEntityPropertyManager.modal.open({
        entityFullName: 'MyCompanyName.AbpZeroTemplate.Authorization.Users.User',
        rowId: data.record.id,
    });
}

For example you can use it in list page action

var dataTable = _$usersTable.DataTable({
        //...
        columnDefs: [
            {
                targets: 1,
                data: null,
                orderable: false,
                autoWidth: false,
                defaultContent: '',
                rowAction: {
                    text:
                        '<i class="fa fa-cog"></i> <span class="d-none d-md-inline-block d-lg-inline-block d-xl-inline-block">' +
                        app.localize('Actions') +
                        '</span> <span class="caret"></span>',
                    items: [
                        //..
                        {
                            text: app.localize('DynamicProperties'),
                            visible: function () {
                                return _dynamicEntityPropertyManager.canShow(
                                    'MyCompanyName.AbpZeroTemplate.Authorization.Users.User'
                                );
                            },
                            action: function (data) {
                                _dynamicEntityPropertyManager.modal.open({
                                    entityFullName: 'MyCompanyName.AbpZeroTemplate.Authorization.Users.User',
                                    rowId: data.record.id,
                                });
                            },
                        }
                    ]
                }
            }

        ],
    });
dynamic-propert-of-entity
Property Summary
ParameterName* Unique name of the dynamic parameter
Input Type* Input type name of the dynamic parameter
Permission Required permission to manage anything about that parameter
(DynamicParameterValue, EntityDynamicParameter, EntityDynamicParameterValue)
In this document