• Javier Perero
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
Hi All,
I am trying to make a VisualForce page that on Load it show a simple JS Toast..
But i am keeping getting the following error:

Uncaught ReferenceError: sforce is not defined
    at showToast

This is my Visual Force Page, what i am doing wrong?:

<apex:page standardController="Account" lightningStylesheets="true" >
    <script type="text/javascript">
        window.onload = showToast();
        function showToast() {
            sforce.one.showToast({
                "title": "Attenzione",
                "message": "Test Message.",
                "type": "warning"
            });
        }
        
    </script>
</apex:page>

Thanks for help :) really apprecciated.
Hi,

I have a header on the second page.

This page is where i will display the opportunity line items, the header for this page is different from the header displayed on the pages following it. The problem is however, if the opportunity line items spill onto the third page then that header needs to go with it. The header is a static resource image. The footer then also needs to be displayed on the bottom of the page. It also is a static resource image.

I can paste my code if necessary however I'm very new to this and I'm sure it is full of mistakes haha.