Salesforce Aura コンポーネントと Lightning Web コンポーネントForm関数のサンプル

環境
Salesforce Apex

概要
Form 関数 Aura コンポーネント Lightning Web コンポーネント
編集、表示、参照のみモードをサポート lightning:recordForm lightning-record-form
参照のみのフォーム lightning:recordViewForm lightning-record-view-form
編集可能なフォーム lightning:recordEditForm lightning-record-edit-form

BrokerDetails Aura コンポーネント

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<lightning:recordForm
objectApiName= "Borker__c"
recordId = "{!v.property.Broker__c}"
fields = "{!v.brokerFields}"
columns="2"/>
<lightning:recordForm objectApiName= "Borker__c" recordId = "{!v.property.Broker__c}" fields = "{!v.brokerFields}" columns="2"/>
<lightning:recordForm
 objectApiName= "Borker__c"
 recordId = "{!v.property.Broker__c}"
 fields = "{!v.brokerFields}"
 columns="2"/>

brokerCard Lightning コンポーネントの HTML

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<lightning-record-form
object-api-name = "Broker__c"
record-id={brokerId}
fields={brokerFields}
columns="2">
</lightning-record-form>
<lightning-record-form object-api-name = "Broker__c" record-id={brokerId} fields={brokerFields} columns="2"> </lightning-record-form>
<lightning-record-form
 object-api-name = "Broker__c"
 record-id={brokerId}
 fields={brokerFields}
 columns="2">
 </lightning-record-form>

 

IT

Posted by arkgame