• Bunty
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 9
    Replies

when i try and create a new class the api version dropdown only shows 23.0 for API version 

 

I'v e checked for updates and apparently there is no IDE 24  that i can see.

 

Is this just a matter of editing the class meta xml  APIversion tag after i create the class? 

 

 

Below is the code for my Visual Force page and APEX controller. I run a TRY block and intentionaly throw an exception.

 

I used similar code in another VisualForce/APEX Controller page combination and it works for me however on this page when I click the button and the exception is thrown the error message is not displaying.

 

VisualForce Page

<apex:page controller="PlacementPreferenceFormController" sidebar="false" showHeader="false" cache="false">
    <apex:pageMessages id="errorMessage"/>
    <apex:outputPanel >
            <apex:form >
            <apex:pageBlock title="Placement Preference Form">
            
                <apex:pageBlockSection columns="2">
                      <apex:InputField value="{!RecruitmentCycle.Allocated_Points__c}"/>
                      <apex:InputField value="{!RecruitmentCycle.Remaining_Points__c}"/>
                </apex:pageBlockSection>
            </apex:pageBlock>
            
            <apex:pageBlock title="Add Placement Preference" mode="edit" id="PPAdd">
                <apex:pageBlockSection columns="2">
                    <apex:outputLabel value="Partner Organization " for="pl"><apex:selectList id="pl" value="{!ppn.Partner_Research__c}" size="1" title="Partner Organization">
                        <apex:selectOptions value="{!PRs}"></apex:selectOptions>
                    </apex:selectList></apex:outputLabel>
                                    
                    <apex:InputField value="{!ppn.Points__c}"/>
                    <apex:commandButton value="Add Placement" action="{!newPlacementPreference}" rerender="all">
                    </apex:commandButton>
                </apex:pageBlockSection>    
            </apex:pageBlock>
            
            <apex:pageBlock title="Placement Preferences" mode="edit" id="PPList">
                <apex:pageBlockTable value="{!PlacementPreferenceList}" var="pp">
                    <apex:column value="{!pp.Partner_Research_Organization__c}"/>
                    <apex:column value="{!pp.Organization_Type__c}"/>
                    <apex:column value="{!pp.City__c}"/>
                    <apex:column value="{!pp.State__c}"/>
                    <apex:column value="{!pp.Points__c}"/>
                    <apex:column headerValue="Action">    
                        <apex:commandButton value="Del" action="{!deletePlacementPreference}" rerender="all">
                            <apex:param name="ppParam" value="{!pp.Id}" assignTo="{!ppid}"/>
                        </apex:commandButton>
                    </apex:column>                            
                </apex:pageBlockTable>
            </apex:pageBlock>
        </apex:form>
    </apex:outputPanel>
</apex:page>

 

APEX Controller

public class PlacementPreferenceFormController {

	// Declare Recruitment Cycle and Placement Preference List
	public Recruitment_Cycle__c rc;
	public LIST<Placement_Preference__c> ppl;
	public Placement_Preference__c ppn {get; set;}
	public String pl {get; set;}
	public decimal ppnPoints {get;set;}
	public string ppnPR {get;set;}	
	public string ppid {get;set;}
	
	public PlacementPreferenceFormController(){
		// Select Recruitment Cycle Record pulling ID parameter
		rc = [select id, allocated_points__c, remaining_points__c from Recruitment_Cycle__c
		where id =:ApexPages.currentPage().getParameters().get('id')]; 
		  
		// Select Placement Preference List from parent record
		ppl = [select id, Partner_Research_Organization__c, City__c, Organization_Type__c, Partner_Research__c, Points__c, Recruitment_Cycle__c, State__c
		from Placement_Preference__c Where Recruitment_Cycle__c = :ApexPages.currentPage().getParameters().get('id')];
		
		ppn = new Placement_Preference__c();		
	}
	
	// Picklist Select Option Values for Partner Research
	public List<selectOption> getPRs() {
			List<selectOption> options = new List<selectOption>(); //new list for holding all of the picklist options
			options.add(new selectOption('', '- None -')); //add the first option of '- None -' in case the user doesn't want to select a value or in case no values are returned from query below
			for (Partner_Research__c PRoption : [select id, Organization_Name__r.name from Partner_Research__c 
		Where (TBR_Partner_Year__c = '2012' AND Research_Stage__c = 'Recruiting' AND Status__c = 'Invite to submit proposal')
		  OR (TBR_Partner_Year__c = '2012' AND Research_Stage__c = 'Position Proposal') 
		  OR (TBR_Partner_Year__c = '2012' AND Research_Stage__c = 'Placement') 
		ORDER BY Organization_Name__r.name]) { //query for User records with System Admin profile
				options.add(new selectOption(PRoption.Id, PRoption.Organization_Name__r.name)); //for all records found - add them to the picklist options
			}
			return options; //return the picklist options
		}	
	
	public void refreshPlacementPreferences()
	{
		ppl = [select id, City__c, Organization_Type__c, Partner_Research__c, Points__c, Recruitment_Cycle__c, State__c
		from Placement_Preference__c Where Recruitment_Cycle__c = :ApexPages.currentPage().getParameters().get('id')];				
	}
	
    public PageReference deletePlacementPreference() {
        Placement_Preference__c pptd = [Select id from Placement_Preference__c where Id = :ppid];
		delete pptd;
		string url = 'http://broadcenter.force.com/page/PlacementPreferences?id=' + rc.Id;
		PageReference p = new PageReference(url);
    	p.setRedirect(true); 
        return p;
    }	
    
    public PageReference newPlacementPreference() {
	try{
			
			throw new cException('Residency Requirement is a required field.');
	    	Placement_Preference__c ppta = new Placement_Preference__c(Recruitment_Cycle__c = rc.id);			
			if (ppn.Points__c > 0)
			{
				ppta.Points__c = ppn.Points__c;
				ppta.Partner_Research__c = ppn.Partner_Research__c;
				insert ppta;
			}
			
			
			string url = 'http://broadcenter.force.com/page/PlacementPreferences?id=' + rc.Id;
			PageReference p = new PageReference(url);
	    	p.setRedirect(true); 
	        return p;
    }
    catch(Exception e){ApexPages.addMessages(e);return null;}          
    } 	    
	
	public Recruitment_Cycle__c getRecruitmentCycle(){
		return rc;
	}
	
	public LIST<Placement_Preference__c> getPlacementPreferenceList(){
		return ppl;
	}
	
}

 

Hi All,

 

What's the importance of the Attribute mode of the pageBlock component

HELP!!

I generate an Apex Class from a WSDL file, but i always get the following error message while invoking the apex class.

Error Message: "Web service callout failed: Unable to parse callout response. Apex type not found for element IATSRESPONSE". Is there anybody can help me get out of this problem? Thanks in advance!!!

 

The WSDL file is too large, i can only put the link to the WSDL file here: https://www.iatspayments.com/NetGate/ProcessLink.asmx?WSDL

 

I've already removed the "ProcessLinkSoap12" binding and port element from the WSDL file.

 


I'm using a Site as a custom login page for my customer portal.  I'm able to login and redirect the user to the /home/home.jsp page to get to the customer portal home page, but I'm getting the error message page instead of my custom home page (VF page).  It says "https://mycompany.secure.force.com/portal/ is under construction".  When I login via the portal URL, I don't get this error page.  I checked all of the class and VF page permissions for the portal profile.

 

Any ideas what could be wrong?

Hi

 

I get the following error in Chrome when initially trying to authentiate a user in my portal, this is in my sandbox & not production.

 

This is probably not the site that you are looking for!
You attempted to reach xxxx.sandbox1.cs7.force.com, but instead you actually reached a server identifying itself as *.cs7.force.com. This may be caused by a misconfiguration on the server or by something more serious. An attacker on your network could be trying to get you to visit a fake (and potentially harmful) version of xxxx.sandbox1.cs7.force.com. You should not proceed.
Am I right in saying that this will not happen when in my production environment, if not whats the fix ?