Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user

We have an aura component that is included on the lightning record page. it shows warning messages on certain conditions.

We are facing an error 'Cannot read properties of null(reading fieldname__c)' for a particular profile when the record page is loaded or when the user is navigating anywhere on that record.

  • We are using lightning data service tag force:recorddata in the aura component for accessing the data.

    We are using lightning data service tag force:recorddata in the aura component for accessing the data.
  • The error is coming for the following line where we are accessing the value of a field.

    var solProductValue = component.get("v.simpleRecord").fieldname__c;

    The error is coming for the following line where we are accessing the value of a field.
    var solProductValue = component.get("v.simpleRecord").fieldname__c;
  • We checked the object and field access for the profile and the user has the read access for that object and the mentioned field.

    We checked the object and field access for the profile and the user has the read access for that object and the mentioned field.
  • We are not facing the issue when we log in with the system administrator user.

    We are not facing the issue when we log in with the system administrator user.

We are not able to find the root cause. is this an access issue or code issue? Need help

We have an aura component that is included on the lightning record page. it shows warning messages on certain conditions.

We are facing an error 'Cannot read properties of null(reading fieldname__c)' for a particular profile when the record page is loaded or when the user is navigating anywhere on that record.

  • We are using lightning data service tag force:recorddata in the aura component for accessing the data.

  • The error is coming for the following line where we are accessing the value of a field.

    var solProductValue = component.get("v.simpleRecord").fieldname__c;

  • We checked the object and field access for the profile and the user has the read access for that object and the mentioned field.

  • We are not facing the issue when we log in with the system administrator user.

We are not able to find the root cause. is this an access issue or code issue? Need help

We have an aura component that is included on the lightning record page. it shows warning messages on certain conditions.

We are facing an error 'Cannot read properties of null(reading fieldname__c)' for a particular profile when the record page is loaded or when the user is navigating anywhere on that record.

  • We are using lightning data service tag force:recorddata in the aura component for accessing the data.
  • The error is coming for the following line where we are accessing the value of a field.
    var solProductValue = component.get("v.simpleRecord").fieldname__c;
  • We checked the object and field access for the profile and the user has the read access for that object and the mentioned field.
  • We are not facing the issue when we log in with the system administrator user.

We are not able to find the root cause. is this an access issue or code issue? Need help

Source Link

Cannot read properties of null error while loading an aura component

We have an aura component that is included on the lightning record page. it shows warning messages on certain conditions.

We are facing an error 'Cannot read properties of null(reading fieldname__c)' for a particular profile when the record page is loaded or when the user is navigating anywhere on that record.

  • We are using lightning data service tag force:recorddata in the aura component for accessing the data.

  • The error is coming for the following line where we are accessing the value of a field.

    var solProductValue = component.get("v.simpleRecord").fieldname__c;

  • We checked the object and field access for the profile and the user has the read access for that object and the mentioned field.

  • We are not facing the issue when we log in with the system administrator user.

We are not able to find the root cause. is this an access issue or code issue? Need help