Is it possible to make every field editable in editable grid? for example I have created a custom field and on the editable grid it shows as locked.
function lockUnlockFields(executionContext,fieldName,lockunlock) {
var formContext = executionContext.getFormContext();
let objEntity = formContext.data.entity;
objEntity.attributes.forEach(function (attribute, i) {
if (attribute.getName() == fieldName) {
let attributeToDisable = attribute.controls.get(0);
attributeToDisable.setDisabled(lockunlock);
}
});
}
function unlockMyFields(executionContext)
{
var formContext = executionContext.getFormContext();
var fieldNames = ['unit','discountpercentage'];//put here the logical names of the fields to unlock
for(i=0;i < fieldNames.length;i++)
{
lockUnlockFields(executionContext,fieldNames[i],false);
}
}
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,252 Super User 2024 Season 2
Martin Dráb 228,089 Super User 2024 Season 2
nmaenpaa 101,148