• Shekhar Gadewar 144
  • NEWBIE
  • 0 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 2
    Replies
Html code...
<template>
    <lightning-card title="Guest Entry Form ">
        <div class="slds-p-horizontal_small">
            <lightning-record-edit-form
                record-id=""
                destiny="comfy"
                object-api-name={objectName1}
                onload={handleLoad}
                onsubmit={handleSubmit}
                onsucess={handleSucess}
                onerror={handleError}>
             
            <lightning-layout multiple-rows>
                <lightning-layout-item size="12">
                    <lightning-input-field field-name="Guest_First_Name__c"></lightning-input-field>
                    <lightning-input-field field-name="Guest_Last_Name__c"></lightning-input-field>
                    <lightning-input-field field-name="Guest_Phone_Number__c"></lightning-input-field>
                    <lightning-input-field field-name="Guest_Email_ID__c"></lightning-input-field>
                </lightning-layout-item>
            </lightning-layout>    
            <lightning-layout multiple-rows>
                <lightning-layout-item size="12">
                    <lightning-input-field field-name="Hotel_Type__c"></lightning-input-field>
                    <lightning-input-field field-name="Hotel_City__c"></lightning-input-field>
                </lightning-layout-item>
            </lightning-layout>
            <lightning-layout multiple-rows>
                <lightning-layout-item size="12">
                    <lightning-input data-formfields="Number Of Adults" label="Number Of Adults" type="Number"></lightning-input>
                    <lightning-input data-formfields="Number Of Children(12+ yrs)" label="Number Of Children" type="Number"></lightning-input>
                    <lightning-input data-formfields="Number Of Children (Below 12 yrs)" label="Number Of Children (Below 12 yrs)" type="Number"></lightning-input>
                    <lightning-input data-formfields="Check-In Date" label="Check-In Date" type="Date"></lightning-input>
                    <lightning-input data-formfields="Check-Out Date" label="Check-out_date" type="Date"></lightning-input>
                    <lightning-input data-formfields="Prefered Hotel type" label="Preferred Hotel Type" type="PickList"></lightning-input>
                </lightning-layout-item>
            </lightning-layout>
           
            <lightning-layout-item size="12" class="slds-align_absoulte-centre">
                <lightning-button label="Cancel" class="slds-m-left-large" onclick={resetForm}></lightning-button>
                <lightning-button type="submit"  variant="brand" label="Save" class="slds-m-top-large" onclick={resetForm}></lightning-button>
               
            </lightning-layout-item>
        </lightning-record-edit-form>
        </div>
    </lightning-card>

</template>

----------- 
Js File
----------------
import { LightningElement } from 'lwc';
import GuestMaster__c from '@salesforce/schema/Guest_Master__c';
import HotelMaster__c from '@salesforce/schema/Hotel_Master__c';
export default class GuestEntryWebComponent extends LightningElement {
    objectName1=GuestMaster__c;
    objectname2=HotelMaster__c;
    handleLoad(event){
        console.log(event.type);
        console.log(event.details);
    }
    handelSubmit(event){
        console.log(event.type);
        console.log(event.details);
        event.preventDefault();
        let fields=events.details.fields;
        this.template.queryselector('lightningElement').submit(fields);
    }
    handleSucess(event){
        console.log(event.type);
        console.log(event.details);
        console.log(event.details.id);
    }
    handleError(event){
        console.log(event.type);
        console.log(event.details);
        console.log(event.details.type);
    }
    resetform(event){
        const fiels=this.template.queryselector('lightning-input-fields');
    }
}
-----
XML
------
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>54.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__HomePage</target>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
    </targets>
   
</LightningComponentBundle>


Please Guide me
unexcepted End of expression error is coming ..Plz guide..
ScheduleBatchCRON47 m = new ScheduleBatchCRON47();
String sch = ' 0 0 18 ? *6L';
System.schedule('ScheduleBatchCRON47 Job', sch, m);
global class Batchclass44 implements Database.Batchable<sObject>{
    global static Database.QueryLocator start(Database.BatchableContext bc){
        return Database.getQueryLocator('SELECT Id, Background_Check_Done__c, LinkedIn_Profile__c, Verification_Status__c FROM Trainer_Master__c');
    }

    global void execute(Database.BatchableContext bc, List<Trainer_Master__c> t){
        List<Trainer_Master__c> a = new List<Trainer_Master__c>();
        for(Trainer_Master__c b: t){
            if(string.isblank(b.LinkedIn_Profile__c)){
                b.Verification_Status__c = 'Details Needed';
              
            }else {
               b.Verification_Status__c = ('No' == b.Background_Check_Done__c) ? 'Non Verified' : 'Verified';
            }

        }
    update t;
           
        }
 
    global void finish(Database.BatchableContext bc){ }
}
Html code...
<template>
    <lightning-card title="Guest Entry Form ">
        <div class="slds-p-horizontal_small">
            <lightning-record-edit-form
                record-id=""
                destiny="comfy"
                object-api-name={objectName1}
                onload={handleLoad}
                onsubmit={handleSubmit}
                onsucess={handleSucess}
                onerror={handleError}>
             
            <lightning-layout multiple-rows>
                <lightning-layout-item size="12">
                    <lightning-input-field field-name="Guest_First_Name__c"></lightning-input-field>
                    <lightning-input-field field-name="Guest_Last_Name__c"></lightning-input-field>
                    <lightning-input-field field-name="Guest_Phone_Number__c"></lightning-input-field>
                    <lightning-input-field field-name="Guest_Email_ID__c"></lightning-input-field>
                </lightning-layout-item>
            </lightning-layout>    
            <lightning-layout multiple-rows>
                <lightning-layout-item size="12">
                    <lightning-input-field field-name="Hotel_Type__c"></lightning-input-field>
                    <lightning-input-field field-name="Hotel_City__c"></lightning-input-field>
                </lightning-layout-item>
            </lightning-layout>
            <lightning-layout multiple-rows>
                <lightning-layout-item size="12">
                    <lightning-input data-formfields="Number Of Adults" label="Number Of Adults" type="Number"></lightning-input>
                    <lightning-input data-formfields="Number Of Children(12+ yrs)" label="Number Of Children" type="Number"></lightning-input>
                    <lightning-input data-formfields="Number Of Children (Below 12 yrs)" label="Number Of Children (Below 12 yrs)" type="Number"></lightning-input>
                    <lightning-input data-formfields="Check-In Date" label="Check-In Date" type="Date"></lightning-input>
                    <lightning-input data-formfields="Check-Out Date" label="Check-out_date" type="Date"></lightning-input>
                    <lightning-input data-formfields="Prefered Hotel type" label="Preferred Hotel Type" type="PickList"></lightning-input>
                </lightning-layout-item>
            </lightning-layout>
           
            <lightning-layout-item size="12" class="slds-align_absoulte-centre">
                <lightning-button label="Cancel" class="slds-m-left-large" onclick={resetForm}></lightning-button>
                <lightning-button type="submit"  variant="brand" label="Save" class="slds-m-top-large" onclick={resetForm}></lightning-button>
               
            </lightning-layout-item>
        </lightning-record-edit-form>
        </div>
    </lightning-card>

</template>

----------- 
Js File
----------------
import { LightningElement } from 'lwc';
import GuestMaster__c from '@salesforce/schema/Guest_Master__c';
import HotelMaster__c from '@salesforce/schema/Hotel_Master__c';
export default class GuestEntryWebComponent extends LightningElement {
    objectName1=GuestMaster__c;
    objectname2=HotelMaster__c;
    handleLoad(event){
        console.log(event.type);
        console.log(event.details);
    }
    handelSubmit(event){
        console.log(event.type);
        console.log(event.details);
        event.preventDefault();
        let fields=events.details.fields;
        this.template.queryselector('lightningElement').submit(fields);
    }
    handleSucess(event){
        console.log(event.type);
        console.log(event.details);
        console.log(event.details.id);
    }
    handleError(event){
        console.log(event.type);
        console.log(event.details);
        console.log(event.details.type);
    }
    resetform(event){
        const fiels=this.template.queryselector('lightning-input-fields');
    }
}
-----
XML
------
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>54.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__HomePage</target>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
    </targets>
   
</LightningComponentBundle>


Please Guide me
global class Batchclass44 implements Database.Batchable<sObject>{
    global static Database.QueryLocator start(Database.BatchableContext bc){
        return Database.getQueryLocator('SELECT Id, Background_Check_Done__c, LinkedIn_Profile__c, Verification_Status__c FROM Trainer_Master__c');
    }

    global void execute(Database.BatchableContext bc, List<Trainer_Master__c> t){
        List<Trainer_Master__c> a = new List<Trainer_Master__c>();
        for(Trainer_Master__c b: t){
            if(string.isblank(b.LinkedIn_Profile__c)){
                b.Verification_Status__c = 'Details Needed';
              
            }else {
               b.Verification_Status__c = ('No' == b.Background_Check_Done__c) ? 'Non Verified' : 'Verified';
            }

        }
    update t;
           
        }
 
    global void finish(Database.BatchableContext bc){ }
}