Prepopulate Values in Salesforce

/lightning/o/Account/new?defaultFieldValues=
Name={!URLENCODE(Account.Name)},
OwnerId={!Account.OwnerId},
AccountNumber={!URLENCODE(Account.AccountNumber)},
NumberOfEmployees=35000,
CustomCheckbox__c={!IF(Account.SomeCheckbox__c, true, false)}
&backgroundContext=%2Flightning%2Fo%2FAccount%2Flist%3FfilterName%3DRecent

Prepopulate values through a custom LWC form

html <template><lightning-quick-action-panel header="New Contact"><lightning-record-edit-form if:true={contact.data} object-api-name="Contact" onsubmit={handleSubmit} onsuccess={handleSuccess}><lightning-messages></lightning-messages><div class="slds-m-around_medium"><lightning-input-field field-name="AccountId" value={accIdVal}></lightning-input-field><lightning-input-field field-name="FirstName"></lightning-input-field><lightning-input-field field-name="LastName"></lightning-input-field><div class="slds-m-top_medium"><lightning-button variant="brand" type="submit" name="save" label="Create"></lightning-button></div></div></lightning-record-edit-form></lightning-quick-action-panel></template>JSimport { LightningElement, api, wire } from "lwc";
import { getRecord, getFieldValue } from "lightning/uiRecordApi";
import ACCOUNT_ID_FIELD from "@salesforce/schema/Contact.AccountId";
export default class NewContactDemo extends LightningElement {
@api recordId;
@api objectApiName;
@wire(getRecord, { recordId: "$recordId", fields: ["Contact.AccountId"] }) contact;
get accIdVal() { return getFieldValue(this.contact.data, ACCOUNT_ID_FIELD);}
}
xml<?xml version="1.0" encoding="UTF-8" ?><LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"><apiVersion>53.0</apiVersion><isExposed>true</isExposed><targets><target>lightning__RecordAction</target></targets><targetConfigs><targetConfig targets="lightning__RecordAction"><actionType>ScreenAction</actionType></targetConfig></targetConfigs></LightningComponentBundle>

Other ways to Prepopulate

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store