즐겨찾기Parise Ravikiran (Cognizant Technology Solutions) 님이 #CRM Configuration에 질문했습니다2023년 3월 22일 오후 3: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,