• Shruthi MN 32
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 2
    Replies
Hi,
 
 
Use Case: Try to implement bringing Facebook Lead ads to salesforce by using a method by not integrating though code or any app exchange product.
 
 
Steps followed by me:
 
 
  1. Create a developer account by using https://developers.facebook.com
  2. Create an app in the Facebook developer account 
  3. Created Auth. Providers I tested it was getting an error that I need to whitelist URL
  4. In salesforce org, I whitelisted the URLs.
  5. After that, I got an authentication error so I created Single Sign-On Settings 
  6. Now when I try to authorize I am getting below error
 
I am getting below error 

User-added image
How can we take the back up of Code in LWC
What is export and import in Json LWC and what is retive from org option  in LWC
<aura:component controller="ContactsController">
    <ltng:require styles="{!$Resource.SLDS090}"/>
    <head>
        <title>This will display contacts whose's birthday is today.</title>
    </head>
    <aura:attribute name="contacts" type="List" />
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    <!-- <div class="container">-->

User-added image
    <div class="slds"> 

    <table class="slds-table slds-table--bordered slds-table--striped">
        <thead>
            <tr>
                <th scope="col"><span class="slds-truncate">Date</span></th>
                <th scope="col"><span class="slds-truncate">Contact Name</span></th>
            </tr>
        </thead>
        <tbody>
            <aura:iteration items="{!v.contacts}" var="contact">
                <tr>
                    <td>{!contact.Birthdate}</td>
                    <td>{!contact.Name}</td>
                </tr>
            </aura:iteration>
        </tbody>
    </table>
        </div>
</aura:component>
I have written a code to calculate SI but each time I try to add calculate any value I am getting below error

User-added image
I have created a SI calculator using Lightning Web Component

but the result is not getting displyed can anyone help me with the same and each time I enter values I am getting below error.

I have reffered this use case from below video
https://www.youtube.com/watch?v=f0OFW2EqZow&list=PLdYQMTciVWO9dJAafGxS1HuZy4wx6AxAW&index=13

User-added imageUser-added image

HTML

<template>
    <lightning-card title="Simple Interest Cal"></lightning-card>
    
        <lightning-layout multiple-rows></lightning-layout>
            <lightning-layout-item size= "12" padding = "around-medium" > </lightning-layout-item>
<lightning-input type="number" label = "Enter Principle" onchange= {principalChangeHandler}>
    </lightning-input>
   
    <lightning-layout-item size= "12" padding = "around-medium" > </lightning-layout-item>
    <lightning-input type="numer" label = "Enter No Of Years" onchange= {timechangehandler}>
    </lightning-input>
   
    <lightning-layout-item size= "12" padding = "around-medium" > </lightning-layout-item>
    <lightning-input type="number" label = "Enter Rate Of Interest" onchange= {ratechangehandler}>
    </lightning-input>
   
    <lightning-layout-item size= "12" padding = "around-medium" ></lightning-layout-item>
    <lightning-button label= "Calculate SI" icon-position = "centre" onclick= {calculateSIHandler} >
    </lightning-button>

<lightning-layout-item size= "12" padding = "around-medium" > </lightning-layout-item>
    <lightning-formatted-text value= {currentoutput}  ></lightning-formatted-text>
   
        
</template>

JS

import  { LightningElement, track } from 'lwc';

export default class Simpleinterstcal extends LightningElement {
   
@track currentOutput; 
principal;
rateofinterest;
numberofyears;
principalChangeHandler (event)
{
this.principal = parseint(event.target.value);
}
timechangehandler (event)
{
this.noOfyears = parseint(event.target.value);
}
ratechangehandler (event)
{
this.noOfyears = parseint(event.target.value);
}
calculateSIHandler (event)
{
this.currentOutput = 'Simple Interest is :' + (this.principal*this.rateofinterest*this.numberofyears)/100;
}
}

XML
 <?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>48.0</apiVersion>
    <isExposed>true</isExposed>
<targets>
    <target>lightning__AppPage</target>
    <target>lightning__RecordPage</target>
    <target>lightning__HomePage</target>
</targets>
</LightningComponentBundle>


 
I have written a code to calculate SI but each time I try to add calculate any value I am getting below error

User-added image
I have created a SI calculator using Lightning Web Component

but the result is not getting displyed can anyone help me with the same and each time I enter values I am getting below error.

I have reffered this use case from below video
https://www.youtube.com/watch?v=f0OFW2EqZow&list=PLdYQMTciVWO9dJAafGxS1HuZy4wx6AxAW&index=13

User-added imageUser-added image

HTML

<template>
    <lightning-card title="Simple Interest Cal"></lightning-card>
    
        <lightning-layout multiple-rows></lightning-layout>
            <lightning-layout-item size= "12" padding = "around-medium" > </lightning-layout-item>
<lightning-input type="number" label = "Enter Principle" onchange= {principalChangeHandler}>
    </lightning-input>
   
    <lightning-layout-item size= "12" padding = "around-medium" > </lightning-layout-item>
    <lightning-input type="numer" label = "Enter No Of Years" onchange= {timechangehandler}>
    </lightning-input>
   
    <lightning-layout-item size= "12" padding = "around-medium" > </lightning-layout-item>
    <lightning-input type="number" label = "Enter Rate Of Interest" onchange= {ratechangehandler}>
    </lightning-input>
   
    <lightning-layout-item size= "12" padding = "around-medium" ></lightning-layout-item>
    <lightning-button label= "Calculate SI" icon-position = "centre" onclick= {calculateSIHandler} >
    </lightning-button>

<lightning-layout-item size= "12" padding = "around-medium" > </lightning-layout-item>
    <lightning-formatted-text value= {currentoutput}  ></lightning-formatted-text>
   
        
</template>

JS

import  { LightningElement, track } from 'lwc';

export default class Simpleinterstcal extends LightningElement {
   
@track currentOutput; 
principal;
rateofinterest;
numberofyears;
principalChangeHandler (event)
{
this.principal = parseint(event.target.value);
}
timechangehandler (event)
{
this.noOfyears = parseint(event.target.value);
}
ratechangehandler (event)
{
this.noOfyears = parseint(event.target.value);
}
calculateSIHandler (event)
{
this.currentOutput = 'Simple Interest is :' + (this.principal*this.rateofinterest*this.numberofyears)/100;
}
}

XML
 <?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>48.0</apiVersion>
    <isExposed>true</isExposed>
<targets>
    <target>lightning__AppPage</target>
    <target>lightning__RecordPage</target>
    <target>lightning__HomePage</target>
</targets>
</LightningComponentBundle>