• Ross Gilbert 19
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
public Static List<List> getTabularReport(Id reportId) {

I am getting an error for that line: Error: Compile Error: expecting a left angle bracket, found '>'

Does anyone know what is wrong with the syntax in that line of code?  Thanks a lot
{!REQUIRESCRIPT("/xdomain/xdomain.js")} 
{!REQUIRESCRIPT("/soap/ajax/33.0/connection.js")} 
{!REQUIRESCRIPT("/support/console/33.0/integration.js")} 

var a = {!LEN( $Setup.New_Opportunity_Settings__c.RecordTypeId__c )}; 

if (a > 0) { 
window.parent.navigateToUrl('/006/e?retURL={!Contact.Id}&RecordType={!$Setup.New_Opportunity_Settings__c.RecordTypeId__c}&{!$Setup.New_Opportunity_Settings__c.ContactFieldNameId__c}={!Contact.Name}&{!$Setup.New_Opportunity_Settings__c.PrimaryContactFieldId__c}={!Contact.Id}&accid={!Account.Id}'); 
} else { 
window.parent.navigateToUrl('/setup/ui/recordtypeselect.jsp?ent=Opportunity&retURL={!Contact.Id}&save_new_url=/006/e?retURL={!Contact.Id}&{!$Setup.New_Opportunity_Settings__c.ContactFieldNameId__c}={!Contact.Name}&{!$Setup.New_Opportunity_Settings__c.PrimaryContactFieldId__c}={!Contact.Id}&accid={!Account.Id}'); 
}

This is an onclick javascript button that is on a contact page layout, allowing the user to create a new opportunity.  Seems to work most of the time but occasionally it doesn't, with the error "missing ) after arguments list".  Wondering if anyone knows why this would happen on some contacts not others.
public Static List<List> getTabularReport(Id reportId) {

I am getting an error for that line: Error: Compile Error: expecting a left angle bracket, found '>'

Does anyone know what is wrong with the syntax in that line of code?  Thanks a lot
{!REQUIRESCRIPT("/xdomain/xdomain.js")} 
{!REQUIRESCRIPT("/soap/ajax/33.0/connection.js")} 
{!REQUIRESCRIPT("/support/console/33.0/integration.js")} 

var a = {!LEN( $Setup.New_Opportunity_Settings__c.RecordTypeId__c )}; 

if (a > 0) { 
window.parent.navigateToUrl('/006/e?retURL={!Contact.Id}&RecordType={!$Setup.New_Opportunity_Settings__c.RecordTypeId__c}&{!$Setup.New_Opportunity_Settings__c.ContactFieldNameId__c}={!Contact.Name}&{!$Setup.New_Opportunity_Settings__c.PrimaryContactFieldId__c}={!Contact.Id}&accid={!Account.Id}'); 
} else { 
window.parent.navigateToUrl('/setup/ui/recordtypeselect.jsp?ent=Opportunity&retURL={!Contact.Id}&save_new_url=/006/e?retURL={!Contact.Id}&{!$Setup.New_Opportunity_Settings__c.ContactFieldNameId__c}={!Contact.Name}&{!$Setup.New_Opportunity_Settings__c.PrimaryContactFieldId__c}={!Contact.Id}&accid={!Account.Id}'); 
}

This is an onclick javascript button that is on a contact page layout, allowing the user to create a new opportunity.  Seems to work most of the time but occasionally it doesn't, with the error "missing ) after arguments list".  Wondering if anyone knows why this would happen on some contacts not others.