• seriale online
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 5
    Replies
I'm kinda newbie on js and lightning but i was trying to figure out what this code below is doing. In js a map method runs a function for each item on array but I dont understand why the code is running with a const and getting the field to fillup. 
I also need verify baseprechat's interface to check the method and atributes available but i havent found even though i retrieve all the code to my vscode.
 
import BasePrechat from 'lightningsnapin/basePrechat';
import { api, track } from 'lwc';
import startChatLabel from '@salesforce/label/c.StartChat';

export default class Prechat extends BasePrechat {
    @api prechatFields;
    @api backgroundImgURL;
    @track fields;
    @track namelist;
    startChatLabel;

    /**
     * Set the button label and prepare the prechat fields to be shown in the form.
     */
    connectedCallback() {
        this.startChatLabel = startChatLabel;
        this.fields = this.prechatFields.map(field => {
            const { label, name, value, required, maxLength } = field;

            return { label, value, name, required, maxLength };
        });
        this.namelist = this.fields.map(field => field.name);
    }
}

 
1.  i want to pass the value from vf page to custom component....how? and  what the tag..?plz give eample and explanation
2.what is salesforce1 and what the use..
is there any online aptitude test for salesforce?
am completly new to salesforce plese help.