function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
WTM InfoWTM Info 

Error: Invalid field Email for SObject Account

Hi,

I am trying to build a VF page for Person Accounts that pulls in info from www.mixpanel.com. We have successfully added this content to Leads and Contacts, but I get the following Erroe message when I try to make it for Accounts/Person Accounts: Error: Invalid field Email for SObject Account .

Here is the code: 

<apex:page standardController="Account">
<html>
    <script>
        var api_key = "{!$Setup.Mixpanel__c.API_Key__c}",
            api_secret = "{!$Setup.Mixpanel__c.API_Secret__c}";

        function sendProjectApiInfo(){
            document.getElementById("app_frame").contentWindow.postMessage({api_key:api_key, api_secret:api_secret},"*")
        }
    </script>
    <iframe id="app_frame" scrolling="yes" onload="javascript:sendProjectApiInfo(this);" src="https://mixpanelplatform.com/apps/mixpanel-mixpanel-3-KC7XB5s/?email={!Account.Email}" style="display: block; margin: 0 auto; width: 930px; height: 800px"></iframe>
</html>
</apex:page>

Any help GREATLY appreciated!
WTM InfoWTM Info
Sorry-- I meant to include the following code that IS WORKING:

<apex:page standardController="Contact">

<html>
    <script>
        var api_key = "{!$Setup.Mixpanel__c.API_Key__c}",
            api_secret = "{!$Setup.Mixpanel__c.API_Secret__c}";

        function sendProjectApiInfo(){
            document.getElementById("app_frame").contentWindow.postMessage({api_key:api_key, api_secret:api_secret},"*")
        }
    </script>
    <iframe id="app_frame" scrolling="yes" onload="javascript:sendProjectApiInfo(this);" src="https://mixpanelplatform.com/apps/mixpanel-mixpanel-3-KC7XB5s/?email={!Contact.Email}" style="display: block; margin: 0 auto; width: 930px; height: 800px"></iframe>

</html>

</apex:page>

Thanks!