0

UniformContractingLWC.html

    <lightning-card title="Contract Terms">
        <div class="slds-p-around_medium">
            <lightning-record-form 
            record-id={recordId} 
            object-api-name={objectApiName}
            columns="1" 
            mode="view"
            layout-type="Compact" 
            fields={fields} 
            onsuccess={handleSuccess}
            >
        </lightning-record-form>
        </div>
    </lightning-card>
</template>
UniformContractingLWC.js

    import { getDataConnectorSourceFields } from 'lightning/analyticsWaveApi';
    import { LightningElement, track, api } from 'lwc';
    
    import CONTRACT_FIELD from '@salesforce/schema/Apttus_Proposal__Proposal__c.Contract_Terms__c';
    import STATUS_FIELD from '@salesforce/schema/Apttus_Proposal__Proposal__c.Apttus_QPApprov__Approval_Status__c';
    import NAME_FIELD from '@salesforce/schema/Apttus_Proposal__Proposal__c.Opportunity_Owner__c';
    export default class AccountRecordForm extends LightningElement {
        @api recordId;
        @api objectApiName;
        fields = [CONTRACT_FIELD,STATUS_FIELD,NAME_FIELD];
        // console.log(CONTRACT_FIELD);
        handleSuccess(event){
            // this.recordId = event.detail.id;
            
            console.log(event.detail.id);
        }
    }

I am trying to show Contract_Terms__c, Apttus_QPApprov__Approval_Status__c and Opportunity_Owner__c but it is not showing on the page, while I used same code to show standard field of standard object it worked fine.

OutPut

enter image description here

1 Answer 1

0

Use layout-type="Full" in lightnin-record-form tag.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.