zoukankan      html  css  js  c++  java
  • 创建dynamics CRM client-side (六)

    form 和 field 的notification在开发当中会经常使用到

    // Converting functions to Namespace Notation
    var Sdk = window.Sdk || {};
    (
        function () {
            this.formOnLoad = function (executionContext) {
            };
    
            this.MailPhoneOnChange = function (executionContext) {
                var formContext = executionContext.getFormContext();
                var phoneNumber = formContext.getAttribute("telephone1").getValue();
    
                var expression = /^(()?d{3}())?(-|s)?d{3}(-|s)d{4}$/;
                if (!expression.test(phoneNumber)) {

              // 显示field 和 form的 notification formContext.getControl(
    "telephone1").setNotification("The phone number entered should use correct format","telephonemsg"); formContext.ui.setFormNotification("Info message", "INFO", "formoti1"); } else {
              // 清理field 和 from 的notification formContext.getControl(
    "telephone1").clearNotification("telephonemsg"); formContext.ui.clearFormNotification("formoti1"); } }; } ).call(Sdk);

    我们把代码加载到CRM的account当中,并且测试一下

    创建dynamics CRM client-side (六) - form & field notification

  • 相关阅读:
    Linux libcurl使用 (收藏)
    公钥和私钥与认证和签名
    fedora下配置ipv6 dns服务器
    SHA1
    linux IP 命令
    SSL/TLS协议簇加解密流程
    MD5算法实现原理
    container_of深入理解
    diff和patch使用指南
    oracle 笔记
  • 原文地址:https://www.cnblogs.com/TheMiao/p/11151188.html
Copyright © 2011-2022 走看看