• FORM中的MOAC控制


    1.创建表时,对_ALL表创建同义词

    -- Create Multi Org Synonym

    CREATE  OR REPLACE  SYNONYM CUX_WF_DEF_HEADER FOR CUX.CUX_WF_DEF_HEADER_ALL;


    2.对表添加VPD

    -- Create Multi Org VPD Policy
    BEGIN
      dbms_rls.add_policy(object_name     => 'CUX_WF_DEF_HEADER',
                          policy_name     => 'ORG_SEC',
                          policy_function => 'MO_GLOBAL.ORG_SECURITY',
                          policy_type     => dbms_rls.shared_context_sensitive);
    END;


    删除

    dbms_rls.drop_policy(object_schema => 'APPS',
                            object_name  => 'CUX_WF_DEF_HEADER',
                            policy_name  => 'ORG_SEC');


    3.对CUX应用进行注册
    BEGIN
    fnd_mo_product_init_pkg.register_application   
    (p_appl_short_name => 'CUX',
    p_owner => 'HAND_CXY',
    p_status => 'Y'
    );
    END;

    4.对视图进行注册
    BEGIN
      dbms_rls.add_policy(object_name=>'CUX_MOAC_TEST_V',
      policy_name => 'ORG_SEC',
      policy_function => 'MO_GLOBAL.org_security',
      policy_type => dbms_rls.shared_context_sensitive);
    END;
    (如果不想注册了
    BEGIN
      dbms_rls.drop_policy(object_schema => 'APPS',
                            object_name  => 'CUX_MOAC_TEST',
                            policy_name  => 'ORG_SEC');
    END;
    )

    5.在form的WHEN-NEW-FORM-INSTANCE触发器中加入
    mo_global.init(p_application_short_name);  
    比如mo_global.init('CUX');  

    6.在FORM中选择OU字段的WHEN-VALIDATE-ITEM触发器上加入代码,比如:
    IF :control_block.org_id IS NOT NULL THEN
      mo_global.set_policy_context('S',:control_block.org_id);
    ELSE
      mo_global.set_policy_context('M',NULL);
    END IF;

  • 相关阅读:
    Git------解决右键不显示Git Bash Here问题
    AngularJS------Error: Cannot find module '@angular-devkit/core'
    AngularJS------命令行
    AngularJS------报错"The selector "app-user-item" did not match any elements"
    AngularJS------使用VSCode创建的Angular项目部署IIS
    JQuery------各种版本下载
    docker 卸载
    oauth2.0授权协议
    web service 简介
    Python 优雅获取本机 IP 方法
  • 原文地址:https://www.cnblogs.com/wanghang/p/6299259.html
Copyright © 2020-2023  润新知