2022年10月27日 星期四

JS判斷瀏覽器IE自動轉換Edge或Chrome

 

  1. 提示IE不支援, Edge開啟. IE導向其他頁面

<script>

    if (/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) {

        alert("IE is not supported.");

        window.location = 'microsoft-edge:' + location.href;

       

        setTimeout(function () {

            window.location.href = 'https://localhost';

            //window.close();

        }, 1);

    }

</script>

 

  1. 直接轉Chrome開啟, IE導向其他頁面

<script>

    if (/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) {

       

        var objShell = new ActiveXObject("WScript.Shell");

        objShell.Run("cmd.exe /c start "  + location.href, 0, true);

        setTimeout(function () {

            //history.go(-2);

            window.location.href = 'https://localhost';

            //window.close();

            }, 1);

    }

</script>

ORDS+IIS轉址

 https://medium.com/@rammelhofdotat/iis-and-oracle-apex-ords-437908c79e2

1. 先安裝ORDS

2. IIS新增Sites

3. 設定Rule


ReverseProxy





HTTP>HTTPS








2022年10月24日 星期一

[EBS]Query to find Form Function attached to which Responsibility

https://www.funoracleapps.com/2020/03/query-to-find-form-function-attached-to.html 


SELECT DISTINCT faa.application_name application, rtl.responsibility_name,

ffl.user_function_name, ff.function_name, ffl.description,

ff.TYPE,rtl.language

FROM fnd_compiled_menu_functions cmf,

fnd_form_functions ff,

fnd_form_functions_tl ffl,

fnd_responsibility r,

fnd_responsibility_tl rtl,

apps.fnd_application_all_view faa

WHERE cmf.function_id = ff.function_id

AND r.menu_id = cmf.menu_id

AND rtl.responsibility_id = r.responsibility_id

AND cmf.grant_flag = 'Y'

AND ff.function_id = ffl.function_id

AND faa.application_id(+) = r.application_id

AND UPPER(rtl.responsibility_name) LIKE '%Responsibility_Name%'

--and ffl.user_function_name like '%&Function_Name%'

AND r.end_date IS NULL

AND rtl.language='US'

ORDER BY rtl.responsibility_name;

2022年10月19日 星期三

Oracle APEX EXPORT & IMPORT Application

 


https://docs.oracle.com/en/database/oracle/apex/22.1/aeadm/exporting-and-importing-using-sqlcl.html

EXPORT Application

Step1. Download SQLcl

https://www.oracle.com/database/sqldeveloper/technologies/sqlcl/download/ 


Step2. (Windows)透過提示命令字元或PowerShell連至DB

切換至SQLcl目錄, 例如: D:\Tools\sqlcl-latest\sqlcl\bin

執行: sql.exe ${username}/${password}@//${00.00.00.000:1521}/${DatabaseName}


Step3. Export Application

執行: apex export -applicationid ${appid} -dir ${path}

例如: apex export -applicationid 224 -dir D:/apex_backup

產生 f224.sql 於目錄 D:/apex_backup




Import Application

於SQLcl執行export的sql file

例如: @D:/apex_backup/f224.sql