+ Start a Discussion
Venkat Kali 8Venkat Kali 8 

Lightning Issue in Sandbox


I am facing an issue with lightning--

When I click the escalation/transfer button on the case object in the sandbox I am hitting an error

"Something has gone wrong. [NoErrorObjectAvailable] Access Check Failed! AttributeSet.get(): attribute 'transferQueues' of component
' is not visible to 'markup://c:QueueTransfer" . Below is the definition of button.
var ticketId = "{!Case.Id}";
var userType = "{!User.UserTypeFormula__c}";
var targetUrl = "/c/TicketTransfer.app#main?caseId="+ticketId;
window.location = (userType == "PowerPartner" ? "/partners" : "") + targetUrl;
The lightning component:
<aura:application access="GLOBAL" controller="TaosTransferController">
  <ltng:require styles="/resource/slds/assets/styles/salesforce-lightning-design-system-ltng.css"/>

  <aura:attribute name="page" type="String"/>
  <aura:attribute name="queryParameters" type="String"/>
  <aura:attribute name="ticket" type="Case"/>
  <aura:attribute name="newOwnerId" type="String"/>
  <aura:attribute name="newOwnerName" type="String"/>
  <aura:attribute name="hwCategory" type="String"/>
  <aura:attribute name="hwComponents" type="String"/>
  <aura:attribute name="hwOtherComponent" type="String"/>
  <aura:attribute name="hwSymptoms" type="String"/>
  <aura:attribute name="hwMacAddress" type="String"/>
  <aura:attribute name="hwMfgNumber" type="String"/>

  <aura:handler action="{!c.doInit}" name="init" value="{!this}"/>
  <aura:handler action="{!c.locationChange}" event="aura:locationChange"/>
  <aura:handler action="{!c.updateSelectedOwner}" event="c:ownerSelectEvent"/>
  <aura:handler action="{!c.updateHardwareValues}" event="c:hardwareDataEvent"/>

  <div class="slds">
    <c:grid align="center" style="padding:5%">
      <c:col align="middle" lgSize="10-of-12" mdSize="10-of-12" size="1-of-1">
        <aura:renderIf isTrue="{!v.page == 'main'}">
          <c:TransferMain />
        <aura:renderIf isTrue="{!v.page == 'hardware'}">
          <c:hardwareTransfer ticket="{!v.ticket}"/>
        <aura:renderIf isTrue="{!v.page == 'confirm'}">
    <aura:if isTrue="{!v.page != 'confirm'}">
      <c:grid align="center">
        <aura:renderIf isTrue="{!and(v.page != 'hardware', v.page != 'main')}">
          <c:button press="{!c.goBack}" type="neutral">Go Back</c:button>

QueueTransfer component
<aura:component controller="TaosTransferController">

  <aura:handler action="{!c.doInit}" name="init" value="{!this}"/>
  <aura:attribute name="partnerSite" type="Boolean"/>

  <!--comment test-->

  <div class="slds-form-element">
    <div aria-expanded="true" class="slds-picklist">
      <div class="slds-dropdown-trigger">
        <button aria-haspopup="true" class="slds-button slds-button--neutral
          <span class="slds-truncate">Select a Queue</span>
          <c:svg class="slds-icon slds-icon--large" xlinkHref="/resource/slds/assets/icons/utility-sprite/svg/symbols.svg#groups"/>
        <div class="slds-dropdown slds-dropdown--left slds-dropdown--small slds-dropdown--menu">
          <ul class="slds-dropdown__list" role="menu">
            <aura:iteration items="{!v.transferQueues}" var="opt">
              <li class="slds-dropdown__item" href="#confirm">
                <a class="slds-truncate" href="#confirm" id="{!opt.Id}" onclick="{!c.selectNewOwner}" role="menuitem" title="{!opt.Name}">
            <aura:if isTrue="{!v.partnerSite == false}">
              <li class="slds-dropdown__item" href="#hardware">
                <a class="slds-truncate" href="#hardware" id="00G30000003evAX" onclick="{!c.selectNewOwner}" role="menuitem" title="Vecna Hardware Queue">
                  Vecna Hardware Queue


The Apex Controller
public class TaosTransferController {

  private static User runningUser;
  private static Case ticket;
  private static List<Group> queueOptions;
  private static List<User> userOptions;

  public static User checkUser() {
    if(runningUser == null) {
      runningUser = [
        SELECT Id,Username,Email,FirstName,LastName,Profile.Name
        FROM User WHERE Id = :UserInfo.getUserId()
    return runningUser;

  public static Case getTicketInfo(String caseId) {
    if(ticket == null) {
      ticket = [SELECT Id,Owner.Name,Contact.Name,Vecna_Location__c,
      FROM Case WHERE Id = :caseId LIMIT 1];
    return ticket;

  public static List<Group> getQueues() {
    User u = checkUser();
    List<String> queues = new List<String> {
      'Service Desk Queue','Vecna IT Queue','Vecna Night Escalation Queue','Paper Order Queue','BeneTravel Queue'};
    if(u.Profile.Name != 'Taos Community User') {
      queues.add('Pulse Holding Queue');
      queues.add('Performance Management Queue');
      queues.add('FujiFilm Tickets');
    if(queueOptions == null) {
      queueOptions = [SELECT Id,Name FROM Group WHERE Name IN :queues];
    return queueOptions;

  public static List <User> getUsers() {
    if(userOptions == null) {
      User u = checkUser();
      if(u.Profile.Name == 'Taos Community User') {
        userOptions = [SELECT Id,Name FROM User WHERE Profile.Name = 'Taos Community User' ORDER BY Name];
      } else {
        userOptions = [
          SELECT Id,Name FROM User
          WHERE (IsActive = true AND UserRole.Name LIKE '%Client Support%') OR Profile.Name = 'Taos Community User'
          ORDER BY Name

    return userOptions;

  public static void updateTicket(Case tkt, String comments, Integer paperCases, String oldOwnerName, String newOwnerName) {
    Escalation_Comment__c cmnt = new Escalation_Comment__c();
    cmnt.Comments__c = comments;
    cmnt.Ticket__c = tkt.Id;
    cmnt.From__c = oldOwnerName;
    cmnt.To__c = newOwnerName;
    Database.SaveResult commentResult = Database.insert(cmnt);

    if(commentResult.isSuccess()) {
      tkt.Paper_Cases_Requested__c = paperCases;
      Database.SaveResult ticketResult = Database.update(tkt);


Client Side Controller for TicketTransfer:

  doInit: function(component, event, helper) {


  locationChange: function(component, event, helper) {
    component.set("v.page", event.getParam("token"));

    if (event.getParam("querystring")) {
      helper.handleQueryParameters(component, event);

  goBack: function(component) {
    component.set("v.newOwnerId", "");
    component.set("v.newOwnerName", "");

  updateSelectedOwner: function(component, event) {
    component.set("v.newOwnerId", event.getParam("newOwnerId"));
    component.set("v.newOwnerName", event.getParam("newOwnerName"));

  updateHardwareValues: function(component, event) {
    component.set("v.hwCategory", event.getParam("category"));
    component.set("v.hwComponents", event.getParam("components"));
    component.set("v.hwOtherComponent", event.getParam("otherComponent"));
    component.set("v.hwSymptoms", event.getParam("symptoms"));
    component.set("v.hwMacAddress", event.getParam("macAddress"));
    component.set("v.hwMfgNumber", event.getParam("mfgNumber"));


Helper for TicketTransfer:
  handleQueryParameters: function(cmp, event) {

    var queryParams = event.getParam("querystring").split('=');

    if (queryParams.indexOf('caseId') > -1 && !cmp.get("v.ticket")) {
      var action = cmp.get("c.getTicketInfo");
      var id = queryParams[queryParams.indexOf('caseId') + 1];

        "caseId": id

      action.setCallback(this, function(actionResult) {
        if (actionResult.getState() === "SUCCESS") {
          var ticket = action.getReturnValue();
          cmp.set("v.ticket", ticket);


    if (event.getParam("querystring") === "hardware=true") {
      var hwCategory = cmp.get("v.hwCategory");
      var hwComponents = cmp.get("v.hwComponents");
      var hwOtherComponent = cmp.get("v.hwOtherComponent");
      var hwSymptoms = cmp.get("v.hwSymptoms");
      var hwMacAddress = cmp.get("v.hwMacAddress");
      var hwMfgNumber = cmp.get("v.hwMfgNumber");

      cmp.set("v.ticket.Hardware_Replacement_Category__c", hwCategory);
      cmp.set("v.ticket.Hardware_Replacement_Component__c", hwComponents);
      cmp.set("v.ticket.Other_Component_Info__c", hwOtherComponent);
      cmp.set("v.ticket.Symptoms_Issues__c", hwSymptoms);
      cmp.set("v.ticket.Old_Mac_Address__c", hwMacAddress);
      cmp.set("v.ticket.Old_MFG_Number__c", hwMfgNumber);



ClientSide Controller for QueueTransfer:

    doInit : function(component, event, helper) {
      if(window.location.pathname.indexOf('partners') === -1) {
        component.set("v.partnerSite", false);
      } else {
        component.set("v.partnerSite", true);

    selectNewOwner : function(component, event, helper) {
      var source =  (event.target ? event.target : event.srcElement);
      var newOwnerId = source.id;
      var newOwnerName = source.title;

          newOwnerId: newOwnerId,
          newOwnerName: newOwnerName


Helper for QueueTransfer:
   getQueues : function(component,event) {
	  var a = component.get("c.getQueues");

	  a.setCallback(this, function(action) {
      if (action.getState() === "SUCCESS") {
        component.set("v.transferQueues", action.getReturnValue());
        var result = component.get("v.transferQueues");
      } else {



I would appreciate if anyone can help me with this issue. Thanks a lot in advance !


Best Answer chosen by Venkat Kali 8
_Zach Boyd_Zach Boyd
In your QueueTransfer component it doesn't look like you have the transferQueues attribute defined.

Could you try adding the attribute to that component and see if it resolves your error?
<aura:attribute name="transferQueues" type="String[]"/>

All Answers

_Zach Boyd_Zach Boyd
In your QueueTransfer component it doesn't look like you have the transferQueues attribute defined.

Could you try adding the attribute to that component and see if it resolves your error?
<aura:attribute name="transferQueues" type="String[]"/>
This was selected as the best answer
Venkat Kali 8Venkat Kali 8
HI Zach,

Awesome !! That worked. Thanks for your help ! Appreciate it !!

_Zach Boyd_Zach Boyd
Your welcome! Glad I could help.