The javascript error in Chart: Uncaught TypeError: Cannot read property '0' of undefined

  • 1
  • Problem
  • Updated 2 years ago
  • In Progress
  • (Edited)
Hi everybody,

I'm facing the issue: Blank screen on page load, with the error below. This error occurred on custom profile. Although I set View access to related objects.

Please help me.

Photo of Kevin

Kevin

  • 572 Points 500 badge 2x thumb

Posted 2 years ago

  • 1
Photo of David Giger

David Giger

  • 1,758 Points 1k badge 2x thumb
Kien,

How is your chart setup? Could you maybe post a screenshot of that?

Cheers
Photo of Kevin

Kevin

  • 572 Points 500 badge 2x thumb
Hi David,

This issue didn't occur for Administrator profile.
The chart setup is below:

<components>
<skuidvis__chart model="Aggregate_Billing_ThisYear" maintitle="{{Model.labelPlural}}" type="area" uniqueid="sk-1M3VRh-119">
<dataaxes>
<axis id="amount" title="Amounts" maxvalue="30000000"/>
</dataaxes>
<categoryaxes>
<axis id="categories" categorytype="field" fillvals="true" field="AcctSeed__Date__c" dategranularity="calmonth">
<allowedgranularities>
<type>calweek</type>
<type>calquarter</type>
<type>calyear</type>
</allowedgranularities>
</axis>
</categoryaxes>
<serieslist>
<series valuefield="sumTotalJPY_Account_Payable" splittype="none" modelId="Aggregate_AccountPayable_ThisYear" categoryField="cmAcctSeedDatec" aggfunction="sum"/>
<series valuefield="sumAmountJPY_Cash_Receipt" splittype="none" modelId="Aggregate_CashReceipt_ThisYear" categoryField="cmAcctSeedReceiptDatec" aggfunction="sum"/>
<series valuefield="sumTotalJPY_Billing" splittype="none" modelId="Aggregate_Billing_ThisYear" categoryField="cmAcctSeedDatec" aggfunction="sum" splitfield="AcctSeed__Date__c" type="line"/>
<series valuefield="sumPOTotalPricec" splittype="none" modelId="Aggregate_ProductionOrder_ThisYear" categoryField="cmOrderDatec" aggfunction="sum" type="line"/>
</serieslist>
<colors>
<value>#35817a</value>
<value>#ddf1ef</value>
<value>#8b0000</value>
<value>#8bc34a</value>
<value>#00acc1</value>
<value>#00796b</value>
<value>#056f00</value>
<value>#c5e1a5</value>
<value>#4dd0e1</value>
<value>#26a69a</value>
<value>#259b24</value>
<value>#7cb342</value>
<value>#0097a7</value>
<value>#00695c</value>
</colors>
<legend layout="horizontal" halign="center" valign="bottom" showlabels="true"/>
<allowedtypes>
<type>area</type>
<type>areaspline</type>
<type>column</type>
</allowedtypes>
</skuidvis__chart>
</components>
Photo of David Giger

David Giger

  • 1,758 Points 1k badge 2x thumb
Kien,

Your chart setup looks good.

Are there additional "Field-Level-Securites" or other restraints in place?
Since it worked for the Admin-Profile there has to be some missing SFDC permission for the profile.

Cheers