Skip to content

Instantly share code, notes, and snippets.

@aclips
Created August 18, 2023 18:27
Show Gist options
  • Save aclips/36ff4e561b881850b995eaac77f7ce9d to your computer and use it in GitHub Desktop.
Save aclips/36ff4e561b881850b995eaac77f7ce9d to your computer and use it in GitHub Desktop.
Запрет на изменение полей в профиле пользователя Bitrix24
let codes = [
'NAME',
'LAST_NAME',
'SECOND_NAME'
]
BX.addCustomEvent('BX.UI.EntityConfigurationManager:onInitialize', (e) => {
let id = e.getId()
if (codes.indexOf(id) >= 0) {
if (e._schemeElement) {
let scheme = e._schemeElement
scheme._isEditable = false
if (scheme._settings) {
let settings = scheme._settings
settings.editable = false
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment