创建dynamics CRM client-side (十) - 用JS来获取form type
用户可以用以下代码来获取 form type
this.formOnLoad = function (executionContext) { var formContext = executionContext.getFormContext(); var formType = formContext.ui.getFormType(); if (formType == 1) { formContext.ui.setFormNotification("User is creating account ", "INFO", "notification1"); } else if (formType == 2) { formContext.ui.setFormNotification("User is opening account", "INFO", "notification1"); } else if (formType == 3) { formContext.ui.setFormNotification("User doesn't have permission to edit the record", "Info", "notification1"); } };