Skip to content

Instantly share code, notes, and snippets.

View pranayjswl007's full-sized avatar
🙂
finally {}

Pranay Jaiswal pranayjswl007

🙂
finally {}
View GitHub Profile
import CONTACT_FIRSTNAME from '@salesforce/schema/Contact.FirstName';
import CONTACT_LASTNAME from '@salesforce/schema/Contact.LastName';
createRecord(event ){
let newContact = { [CONTACT_FIRSTNAME.fieldApiName] : 'Pikachu' ,[CONTACT_LASTNAME.fieldApiName] : 'Raichu' };
console.log(newContact);
console.log(CONTACT_FIRSTNAME);
createRecord(event ){
let newContact = {FirstName : 'Pikachu' ,LastName : 'Raichu'};
createMyContact({con : newContact}).then((resp)=>{
this.recordId = resp.Id; //this will auto call wireMethod/
});
@pranayjswl007
pranayjswl007 / mycmp.html
Last active April 8, 2019 16:17
Refresh Apex without any change in Database.
<template>
<lightning-input label={realFormData.FirstName} value={realFormData.FirstName} if:true={realFormData} onchange={updateValue}></lightning-input>
<button class="slds-button" onclick={myRefreshFunction}> Cancle edit</button>
</template>
({
handleClick : function(component, event, helper) {
let pageReference = {
type: 'standard__navItemPage',
attributes: {
apiName: 'MYVFPAGE'
},
state: {
caseNumber: 'jAR'
<aura:application extends="force:slds">
<aura:attribute type="String" name="v.whyCustCallSelected"></aura:attribute>
<lightning:select label="Why Customer Called" aura:id="Why_Customer_Called__c" value="{!v.whyCustCallSelected}" >
<option value="--None--">--None--</option>
<aura:iteration items="[1,2,3,4]" var="item">
<template>
<lightning-record-edit-form
id="recordViewForm"
record-id="0032600000iayLjAAI"
object-api-name="Contact">
<table style="width:100%">
<tr>
<td>
44.0 APEX_CODE,FINEST;APEX_PROFILING,FINEST;CALLOUT,FINEST;DB,FINEST;NBA,FINEST;SYSTEM,FINE;VALIDATION,INFO;VISUALFORCE,FINER;WAVE,FINEST;WORKFLOW,FINER
13:08:57.2 (2060797)|USER_INFO|[EXTERNAL]|0054E000003rlna|test-ur3vgqued4ie@example.com|Pacific Standard Time|GMT-07:00
13:08:57.2 (2129484)|EXECUTION_STARTED
13:08:57.2 (2137113)|CODE_UNIT_STARTED|[EXTERNAL]|01p4E000000oDnK|MyLoadTestClass.myMethod1()
13:08:57.2 (2858147)|HEAP_ALLOCATE|[72]|Bytes:3
13:08:57.2 (2917203)|HEAP_ALLOCATE|[77]|Bytes:152
13:08:57.2 (2944848)|HEAP_ALLOCATE|[342]|Bytes:408
13:08:57.2 (2977212)|HEAP_ALLOCATE|[355]|Bytes:408
13:08:57.2 (3000552)|HEAP_ALLOCATE|[467]|Bytes:48
13:08:57.2 (3040133)|HEAP_ALLOCATE|[139]|Bytes:6