You need to sign in to do that
Don't have an account?

Lightning Issue in Sandbox
Hello,
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.
The Apex Controller
Client Side Controller for TicketTransfer:
Helper for TicketTransfer:
ClientSide Controller for QueueTransfer:
Helper for QueueTransfer:
I would appreciate if anyone can help me with this issue. Thanks a lot in advance !
Venkat
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> <aura:renderIf isTrue="{!v.page == 'hardware'}"> <c:hardwareTransfer ticket="{!v.ticket}"/> </aura:renderIf> <aura:renderIf isTrue="{!v.page == 'confirm'}"> <c:confirmationPage newOwnerId="{!v.newOwnerId}" newOwnerName="{!v.newOwnerName}" oldOwnerName="{!v.ticket.Owner.Name}" ticket="{!v.ticket}"> </c:confirmationPage> </aura:renderIf> </c:col> </c:grid> <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> </aura:renderIf> </c:grid> </aura:if> </div> </aura:application>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 slds-picklist__label"> <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"/> </button> <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}"> {!opt.Name} </a> </li> </aura:iteration> <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 </a> </li> </aura:if> </ul> </div> </div> </div> </div> </aura:component>
The Apex Controller
public class TaosTransferController { private static User runningUser; private static Case ticket; private static List<Group> queueOptions; private static List<User> userOptions; @AuraEnabled public static User checkUser() { if(runningUser == null) { runningUser = [ SELECT Id,Username,Email,FirstName,LastName,Profile.Name FROM User WHERE Id = :UserInfo.getUserId() ]; } return runningUser; } @AuraEnabled public static Case getTicketInfo(String caseId) { if(ticket == null) { ticket = [SELECT Id,Owner.Name,Contact.Name,Vecna_Location__c, Vecna_Location__r.Vecna_Location_Address_1__c,Vecna_Location__r.Vecna_Location_City__c, Vecna_Location__r.Vecna_Location_State__c,Vecna_Location__r.Vecna_Location_Zip_Code__c FROM Case WHERE Id = :caseId LIMIT 1]; } return ticket; } @AuraEnabled 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; } @AuraEnabled 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; } @AuraEnabled 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", ""); window.history.back(); }, 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]; action.setParams({ "caseId": id }); action.setCallback(this, function(actionResult) { if (actionResult.getState() === "SUCCESS") { var ticket = action.getReturnValue(); cmp.set("v.ticket", ticket); } }); $A.enqueueAction(action); } 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) { helper.getQueues(component); 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; $A.get("e.c:ownerSelectEvent").setParams({ newOwnerId: newOwnerId, newOwnerName: newOwnerName }).fire(); } })
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 { alert(action.getState()); } }); $A.enqueueAction(a); }, })
I would appreciate if anyone can help me with this issue. Thanks a lot in advance !
Venkat
Could you try adding the attribute to that component and see if it resolves your error?
All Answers
Could you try adding the attribute to that component and see if it resolves your error?
Awesome !! That worked. Thanks for your help ! Appreciate it !!
Thanks,
Venkat