• Nagaraja SV 12
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 2
    Replies

I have added lightening App  to visualforce page it working well But

the issue here is Added that visualforcepage to sites 

I am geeting below  

http://suragani-developer-edition.ap2.force.com/Customers/c/ContactsAPP.app?aura.format=JSON&aura.formatAdapter=LIGHTNING_OUT Failed to load resource: the server responded with a status of 401 (Unauthorized)

Any suggestions 


VF page code

<apex:page standardController="contact" sidebar="false" showHeader="false" cache="false">
 

<apex:composition template="{!$Site.Template}"> 
    <apex:define name="body">

               
    <apex:includeLightning />

    <div id="lightning" />

    <script>
        $Lightning.use("c:ContactsAPP", function() {
          $Lightning.createComponent("c:contacts",
          {},
          "lightning",
          function(cmp) {
            console.log("Component created!");
                    console.log(cmp);
          });
        });
    </script>

        
   
    </apex:define>
</apex:composition>

</apex:page>

Lightening APP
<aura:application access="GLOBAL" extends="ltng:outApp">
   <aura:dependency resource="c:contacts"/>
</aura:application>

 

Exercises for the Adventurous 

Any idea how to slove these 

1.Clear the Form After Submission
2,Display an “Expense Saved” Message

How to show success message after record successfully saved to server.

 

How to show success message after record successfully saved to server.