• Raj kumar R
  • 0 Points
  • Member since 2017

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 1
I will be implementing Partner Communities. I am testing in a dev org to confirm functionality. I have a Button on the Contact that executes javascript. It works fine from the internal org but gives this error from the community:

A problem with the OnClick JavaScript for this button or link was encountered:

{faultcode:'UNKNOWN_EXCEPTION', faultstring:'UNKNOWN_EXCEPTION: Site under construction', }

The button code is
var dob = '{!Contact.Birthdate}';
var sal = '{!Contact.Annual_Income__c}';
var plandate = '{!Contact.Date_Entered_Plan__c}';
var inflation = '{!Contact.Expected_Raise_Per_Year__c}';

if( dob == '' || sal == '' ||inflation == '' || plandate == '')
alert('Please Validate Birthdate/Annual Income/Date Entered Plan/Expected Raise Per Year/ Spouse DOB');

sforce.apex.execute("GeneratePensionReport","attachReport", {id:"{!Contact.Id}"});
window.alert("Pension Report has been Generated and Attached." );

I think this issue has to do with the context - since it is running from the community it thinks it has a different domain.  Not sure how to address this.
Any help would be appreciiated.