Lightning Component

AllisonAllison ✭✭✭
edited August 8, 2019 in Questions

(1)    Lightning Component in Aura isn’t relaying the record IDs correctly.  The code is below.  What do I need to change here so that it pulls the record ID correctly?

<aura:component implements="force:hasRecordId,flexipage:availableForRecordHome,lightning:actionOverride" access="global">

<skuid:page page="BWMContact__mobileLight" id="{!v.recordId}"/>

</aura:component>

Comments

  • J.J. 💎
    edited September 6, 2018
    Hi, Allison. Quick question: are you basing that code on this Skuid documentation entry? If so, I think you've just found a issue in our documentation, because that markup needs to be changed slightly. Thank you for finding that, and we'll get it patched up, but in the meantime, does it work if you use this instead?
    <aura:component implements="force:hasRecordId,flexipage:availableForRecordHome,lightning:actionOverride" access="global">
        <skuid:page page="BWMContact__mobileLight" recordId="{!v.recordId}"/> </aura:component> 
    Basically, swap that id attribute out for recordId.
  • AllisonAllison ✭✭✭
    edited August 20, 2018
    I noticed this was marked as "solved" but the code you provided doesn't work... see below for the SF error.  Can you advise on how I should edit?
  • J.J. 💎
    edited August 21, 2018
    Hmmmm... I'm not sure why that got marked as "solved," to be honest. However, it looks like I misspoke: "recordId" isn't the correct attribute after all. When you say that "Aura isn’t relaying the record IDs correctly," what do you mean? Setting that "id" attribute should make the id value available for $Param merges, model conditions, etc.
  • AllisonAllison ✭✭✭
    edited August 21, 2018
    When using the native search in SF, it doesn't pull up the searched record.  Instead, it just goes to the first record created in SF each time.  
  • Zach McElrathZach McElrath Principal Software Engineer Chattanooga, TN 💎💎💎
    edited August 21, 2018
    Allison, the Skuid Page component automatically includes the context Record Id, you don't need to specify it actually. This should be sufficient:

    <aura:component implements="force:hasRecordId,flexipage:availableForRecordHome,lightning:actionOverride" access="global">
        <skuid:page page="BWMContact__mobileLight"/> 
    </aura:component>


    Your Skuid Page may be where the problem is --- I'm assuming you have at least one Model with a Condition on it? The Condition will need to be on the Id field, and it's value source should be "Page / URL Parameter", with the Parameter Name set to "id" (lowercase).
  • AllisonAllison ✭✭✭
    edited August 27, 2018
    I went back through the model conditions and the only one set to an outside source is ContactData, condition screenshot is below.  All other models refer back to the ContactData model.

    Also, can we get this thread marked as "unsolved"?

    image
  • Zach McElrathZach McElrath Principal Software Engineer Chattanooga, TN 💎💎💎
    edited August 27, 2018
    Allison, I've changed the status back to "In Progress".

    Can you explain exactly where this Skuid Page component is being used? You mentioned earlier the "native search in SF" --- can you elaborate on that, perhaps post a screenshot of where you are using the Skuid Page component?
  • AllisonAllison ✭✭✭
    edited August 27, 2018
    I'm using the Lightning Component as a "Buttons, Links, Action" override for Mobile.  I also tested as a Lighting Experience Override to make sure our issue isn't mobile-specific, but it doesn't work there either.

    image
  • Zach McElrathZach McElrath Principal Software Engineer Chattanooga, TN 💎💎💎
    edited August 27, 2018
    Thanks Allison. And for completeness, can you post the code for the Lightning Component you are currently using that includes a <skuid:page /> component? 
  • AllisonAllison ✭✭✭
    edited August 27, 2018
    Yes,

    <aura:component implements="force:hasRecordId,flexipage:availableForRecordHome,lightning:actionOverride" access="global">
        <skuid:page page="BWMContact__mobileLight"/> 
    </aura:component>
  • AllisonAllison ✭✭✭
    edited September 6, 2018
    Any luck on this?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!