Shared Javascript across Apps

評論

1 條評論

  • Avatar
    Vishnu Datta Manyam

    Hi Shane,

    I hope this message finds you well.

    Currently, AgilePoint does not provide native support for sharing JavaScript files across applications. However, there is an alternative method to achieve this objective, outlined below:

    Approach: We can store the JavaScript file in a file system where it is publicly accessible. Then, we can load the file within a form using the "script" tag, as demonstrated in the code snippet below:

    Script:

    var sharedScript = document.createElement('script');
    sharedScript.setAttribute('src', 'URL_TO_FILE');
    document.head.append(sharedScript);

    This script can be incorporated either within a shared JavaScript file, which would be loaded in all forms requiring the global script, or it can be directly written within the JavaScript section of individual forms.

    Please let me know if you have any questions or need further clarification on this approach.

    0
    評論操作 永久連結

登入寫評論。