Show and Hide annotation onload client script throws error in Portal

abirakundu23
Mega Sage

Hi All,

We have created a onload client script for annotation show/hide on a sn_hr_core_task table.

But we get some error in portal , Please find the attached screenshots.

function onLoad() {
    //Type appropriate comment here, and begin script below
    if ((g_form.getValue('u_is_an_extension_granted1') == '1' || g_form.getValue('u_is_an_extension_granted1') == '2') && g_form.getValue('short_description') == 'Localisation date confirmation') {
        // Hide the annotation
        $('my_annotation').up().show();

    } else {
        // Show the annotation
        $('my_annotation').up().hide();
    }

}

19 REPLIES 19

MrMuhammad
Giga Sage

Hi there,

If your client script is in scoped app then for executing the DOM manipulation script you need to create a property "glide.script.block.client.globals " with value "false". This will resolve the issue $ is not a function.

Please mark this helpful/correct, if applicable.

Regards,

Muhammad

Regards,
Muhammad

Hi Muhammad,

could you please look into this that created ? Please find my attached screenshot. It will be any impact ?

 

Hi,

yes, the property setting looks good. Have you tried your script with any luck? 

Please remove the cache of the instance as well after creating this property.

Write cache.do in the application navigator and hit enter.

Regards,
Muhammad

Hi @Muhammad,

It is already created on my instance.
find_real_file.png

Check the value for that. It should be false if not then please change it to false.

Regards,
Muhammad