Choice value is not visible to customer but admin can see

Samiksha2
Mega Sage

Hi,

I have added Business line (choice field )field in the Product model table. and same added in the Sold product table. 

I have written a script include to show the Business line values in the catalog form based on account.
Script include

    getBusinessLinePortal: function() {
        var bl = [];
        var account = this.getParameter("sysparm_account");
        gs.log("Account " + account);
        var dee = new GlideRecord("sn_install_base_sold_product");
        dee.addEncodedQuery('account=' + account);
        dee.query();
        while (dee.next()) {
            bl.push(dee.product.u_business_line_product.toString());
        }
        gs.log("Business Line " + bl);
        return bl.join(',');
    },

Client script

function onLoad() {
    var account = g_form.getValue("csm_account");
    var script_include = new GlideAjax('global.getProductPortal');
    script_include.addParam('sysparm_name', 'getBusinessLinePortal');
    script_include.addParam('sysparm_account', account);
    script_include.getXML(showDetails);

    function showDetails(response) {
        var answer = response.responseXML.documentElement.getAttribute("answer");
        var array = answer.split(',');
        alert("Array " + array);
        for (var i = 0; i < array.length; i++) {
            g_form.addOption('u_business_line', array[i], array[i]);
        }
    }


}

Business line options are- Med, Max, Data
When I am impersonating with customer whose account is associated with Data and Med it is working fine but for Med customer Business Line is not visible.

 

Please help.

Thanks,
Sam

15 REPLIES 15

Rajesh Chopade1
Mega Sage

Hi @Samiksha2 

Access controls might be restricting the visibility of certain records based on user roles:

Ensure that there are no ACL rules that might be preventing the customer from accessing the business line information.

Also ensure that no UI policies or client scripts are unintentionally hiding the field or its options.

 

I hope my answer helps you to resolve your issue, if yes please mark my answer helpful and correct.

thank you

rajesh

Hi @Rajesh Chopade1 ,
I checked there is no ACL written for that field.  I am not understanding if one Business Line customer can see the value then why the Med customer is not seeing it.😑

Thanks,
Sam

Hi @Samiksha2 

one more check impersonate with 'Med customer' and check you able to see the data under 'Product model table' for same field for which you facing the issue.

 

Hi @Rajesh Chopade1 ,

All customers have only CSM portal access. they cannot see the platform.
Thanks,
Sam