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);
}
}
André Arnaud de Cal... 291,642 Super User 2024 Season 2
Martin Dráb 230,371 Most Valuable Professional
nmaenpaa 101,156