お気に入りParise Ravikiran (Cognizant Technology Solutions) が「#CRM Configuration」で質問2023年3月22日 15:03i need help:i am unable to get Account source picklist type value . i need account source picklist can anyone help me in this.html file:<template> <lightning-card title="Create Account Record" class="slds-align_absolute-center"> <div class="slds-m-around_medium"> <lightning-record-edit-form object-api-name={objectApiName} onsuccess={handleSuccess}> <lightning-input-field field-name="Name" required></lightning-input-field> <lightning-input-field field-name="BillingStreet"></lightning-input-field> <lightning-input-field field-name="BillingCity"></lightning-input-field> <lightning-input-field field-name="BillingState"></lightning-input-field> <lightning-input-field field-name="BillingPostalCode"></lightning-input-field> <lightning-input-field field-name="BillingCountry"></lightning-input-field> <lightning-input-field field-name="AccountSource" required></lightning-input-field> <lightning-input-field field-name="AnnualRevenue" required></lightning-input-field> <lightning-input-field field-name="Website"></lightning-input-field> <lightning-button variant="brand" label="Save" title="save" type="submit" onclick={handleSuccess}></lightning-button> <lightning-button variant="brand" label="Cancel" title="cancel" onclick={handleCancel}></lightning-button></lightning-record-edit-form></div> </lightning-card> </template>Js.file:import { LightningElement,track } from 'lwc';import { CloseActionScreenEvent } from 'lightning/actions';import { createRecord } from 'lightning/uiRecordApi';import { ShowToastEvent } from 'lightning/platformShowToastEvent';import ACCOUNT_OBJECT from '@salesforce/schema/Account';import NAME_FIELD from '@salesforce/schema/Account.Name';import BILLINGSTREET_FIELD from '@salesforce/schema/Account.BillingStreet';import BILLINGCITY_FIELD from '@salesforce/schema/Account.BillingCity';import ACCOUNTSOURCE_FIELD from '@salesforce/schema/Account.AccountSource';import REVENUE_FIELD from '@salesforce/schema/Account.AnnualRevenue';import WEBSITE_FIELD from '@salesforce/schema/Account.Website';export default class QuickAccount extends LightningElement { firstName = ''; annualRevenue = ''; accountSource = ''; website = ''; billingStreet = ''; billingCity = ''; industry = ''; handleFirstNameChange(event) { this.accountId = undefined; this.firstName = event.target.value; } handleAnnualRevenueChange(event){ this.annualRevenue=event.target.value; } handleAccountSourceChange(event){ this.accountSource=event.target.value; } handleWebsiteChange(event){ this.website=event.target.value; } handleBillingStreetChange(event){ this.billingStreet=event.target.value; } handleBillingCityChange(event){ this.billingCity=event.target.value; } handleIndustryChange(event){ this.industry=event.target.value; } closeAction(){ this.dispatchEvent(new CloseActionScreenEvent()); } createAccount() { const fields = {} fields[NAME_FIELD.fieldApiName] = this.firstName; fields[BILLINGSTREET_FIELD.fieldApiName] = this.billingStreet; fields[BILLINGCITY_FIELD.fieldApiName] = this.billingCity; fields[REVENUE_FIELD.fieldApiName] = this.annualRevenue; fields[ACCOUNTSOURCE_FIELD.fieldApiName] = this.accountSource; fields[WEBSITE_FIELD.fieldApiName] = this.website; const recordInput = { apiName: ACCOUNT_OBJECT.objectApiName, fields }; createRecord(recordInput) .then(account => { this.dispatchEvent( new ShowToastEvent({ title: 'Success', message: 'Account created', variant: 'success', }), ); }) .catch(error => { this.dispatchEvent( new ShowToastEvent({ title: 'Error creating record', message: error.body.message, variant: 'error', }), ); }); } }i am expecting below type:but i am getting below for account source : 表示件数を増やす1 件の回答並び替え日付で並び替え役に立った順で並び替え日付で並び替えSai Praveen Kumar Kakkirala (Salesforce)2023年3月23日 9:29Hi,Are you using this component in place of Edit button. Can you confirm how you are using this component on lightning page? Can you check example where it was shown how to get picklist values in lec.Thanks, コメントを追加回答を記入...太字斜体下線取り消し線箇条書き番号付きリストリンクを追加コードブロック画像を挿入ファイルを添付リンク URLキャンセル保存0/9000返信
Sai Praveen Kumar Kakkirala (Salesforce)2023年3月23日 9:29Hi,Are you using this component in place of Edit button. Can you confirm how you are using this component on lightning page? Can you check example where it was shown how to get picklist values in lec.Thanks,