Line items not showing in Skuid view for users

  • 1
  • Problem
  • Updated 2 years ago
I have an Invoice detail page that has a tab showing the invoice line items in a table. There are two tables for invoice line items rendering based on a field on the invoice. Here is where it gets weird...I can see the line items but other users can not. Some of these other users have the same permission and profile as me. I have sys admin permissions. 

Things I have checked:
  • Ensure the rendering condition is not specific to me.
  • That other users can see the line items in SF standard view
  • Permission to field that the rendering is based on.
  • checked model data in the console while logged in as another user to ensure the data is populating.
Let me know if any other information would be helpful. Any suggestions would be greatly appreciated!
Photo of Tami Lust

Tami Lust

  • 5,280 Points 5k badge 2x thumb
  • confused

Posted 2 years ago

  • 1
Photo of Tami Lust

Tami Lust

  • 5,280 Points 5k badge 2x thumb
To add more complexity to this issue. If I take the table out of the tab set then the table loads for everyone. There are no rendering conditions on the tab.

It seems the culprit is an inline snippet although I am not sure how. I have printed the snippet below in case some one that knows more than me can see the connection.

(function(skuid) {
      var $ = skuid.$;
      $(document.body).one('pageload',function(){

var model = skuid.model.getModel('Invoice');//get Model
var row = model.getFirstRow();
var purchaser = row.SCMC__Sales_Order__r.SCMC__Customer_Quotation__r.SCMC__Customer_Account_Contact__r.Name;
var purchaserContact = row.SCMC__Sales_Order__r.SCMC__Customer_Quotation__r.SCMC__Customer_Account_Contact__r.Phone;

if (row.SCMC__Sales_Order__r.SCMC__Customer_Quotation__r != 'undefined' & row.AC_Print_Purchaser__c === 'undefined' || row.AC_Print_Purchaser_Contact__c === 'undefined') {
        var printPurchaser = row.AC_Print_Purchaser__c;
        var printPurchaserContact = row.AC_Print_Purchaser_Contact__c;
}

console.log(purchaser);
console.log(purchaserContact);
console.log(printPurchaser);
console.log(printPurchaserContact);

model.updateRow(row, {
    AC_Print_Purchaser__c: purchaser,
    AC_Print_Purchaser_Contact__c: purchaserContact,
        });
model.save();
    });
})(skuid);
(Edited)
Photo of Chandra V

Chandra V, Champion

  • 6,966 Points 5k badge 2x thumb
Do your users have permission to save the Invoice model (and Edit the two fields you are updating)?
Photo of Tami Lust

Tami Lust

  • 5,280 Points 5k badge 2x thumb
Yes the users have permission to save the invoice and edit the other two fields.
Photo of Velvel Marasow

Velvel Marasow

  • 172 Points 100 badge 2x thumb
There's a missing ampersand in the main if statement, that might be it