2

I have a Lightning Component that displays a list of links with onClick handlers and an id value that represents a record in Salesforce.

<aura:iteration items="{!v.projects}" var="p">
    <a onclick="{!c.handleProjectClick}" id="{!p.Id}">
        ...
        <ui:outputText value="{!p.Title__c}"/>
        ...        
    </a>
</aura:iteration>

The handler takes the id that is passed to it and finds the complete record in a List that was requested when the component initialized.

handleProjectClick : function(component, event, helper) {

var button = event.target;
var projectId = button.id;

var projects = component.get("v.connectionProjects");
var selectedProject = projects.find(obj => obj.Id == projectId);

var modalBody;
var modalFooter;
$A.createComponents([
    ["c:DecisionMakersRequestDetails", {
        projectId: projectId,
        project: selectedProject
    }],
    ["c:DecisionMakersInvitationFooter", {
        buttons: [
        {
            name:"cancel",
            label:"Close",
            variant:"neutral"
        },
        {
            name:"decline",
            label:"Decline",
            variant:"brand"
        },
        {
            name:"accept",
            label:"Accept",
            variant:"brand"
        }
    ]}]
],
function(components, status, statusMessagesList) {
    if (status === "SUCCESS") {
        modalBody = components[0];
        modalFooter = components[1];
        component.find('overlayLib').showCustomModal({
            header: "Accept Meeting",
            body: modalBody, 
            footer: modalFooter,
            showCloseButton: false,
            cssClass: "slds-modal_large",
            closeCallback: function() {
                ...
            }
        })
    } else {
        console.log(statusMessagesList[0].message);
        console.log(statusMessagesList[1].message);
    }                             
});

},

When an item in the list is first clicked I get an error message in statusMessagesList[0].message:

An internal server error has occurred Error ID: 262451266-30465 (1976245512)

Clicking on a link after that works as expected, opening the modal with the record details contained within and the three footer buttons. Clicking any other link on the page also works as expected.

The error message doesn't lead me anywhere except an article for a bug that was fixed in 2012.

c:DecisionMakersRequestDetails is very simple. It displays the information contained in the project attribute. It has no methods of it's own and nothing initializes.

I'm struggling to find what could have changed/initialized on the first click that persists and allows additional clicks to work.

Anyone had an issue like this, or can make any sense of that internal error ID?

  • 1
    normally, with this type of error code, you hould be able to contact salesforce support for additional details – glls Dec 12 '18 at 21:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.