0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Quick Start: Aura Components

Last updated at Posted at 2023-09-19

Create an Aura Component

何もしないで検証ボタンを押した場合

The 'MyContactList' component was not found.

コンポーネントを作っただけ

Could not find a Lightning Record Page named 'Account Record Page'.

United Oil & Gas Corpという取引先がなかったけど、問題ないみたい

image.png

Retrieve a Contact List

何もしないで検証ボタンを押した場合

The component does not include a 'aura:handler'

({
    myAction : function(component, event, helper) {
        var action = component.get("c.getContacts");
        action.setParams({
            recordId: component.get("v.recordId")
        });
        action.setCallback(this, function(data) {
            component.set("v.Contacts", data.getReturnValue());
        });
        $A.enqueueAction(action);
    },
    
})

Render and Preview the Contact List

何もしないで検証ボタンを押した場合

The component is missing the 'aura:iteration' component

image.png

({
    myAction : function(component, event, helper) {
        var action = component.get("c.getContacts");
        action.setParams({
            recordId: component.get("v.recordId")
        });
        action.setCallback(this, function(data) {
            component.set("v.Contacts", data.getReturnValue());
            
            component.set("v.Columns", [
                {label:"First Name", fieldName:"FirstName", type:"text"},
                {label:"Last Name", fieldName:"LastName", type:"text"},
                {label:"Phone", fieldName:"Phone", type:"phone"}
            ]);
            
        });
        $A.enqueueAction(action);
    },
    
})
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?