• como_estas
  • NEWBIE
  • 50 Points
  • Member since 2011

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 10
    Replies

I'm trying to get a customer portal working in my development org.  It works but here's the catch:  It doesn't make you log in.  I essentially want any and all pages that are accessed through this site to require authentication, but I'm able to go right to the home screen without it.  I am sure this is something simple and I just don't fully understand how the portal works.  Can somebody help me?

 

Here's a link to the portal which should require you to log in but doesn't:

 

http://morganportal-developer-edition.na14.force.com/portal

 

As you can see it's just the standard Congratulations! VF page.  Funnier even is that I didn't enable VF page access to this page for the portal profile.  I'm lost.

So I have a custom VF page that I wrote as an edit page for a custom object in my org.

 

<apex:page standardController="OrgEvent__c" extensions="EventEditController">

 

On this edit page, there is a button to create a new ContactScheduleItem__c, which is another custom object which has OrgEvent__c as a master detail.  Here's what the button looks like:

 

<apex:commandButton value="New Registrant" action="{!newAttendee}" rerender="attendees"/>

 

Within the EditEventController class, you guessed it, I have a method called newAttendee which is supposed to return a pagereference to a standard edit page for a new ContactScheduleItem__c:

 

	public PageReference newAttendee() {

		apexpages.pagereference ref = new apexpages.standardcontroller(new ContactScheduleItem__c()).edit();
		return ref;    	
	}

 

All looks like it should work, right?  Here's the fun part.  It doesn't.  No matter what kind of object's standard edit page I try to return in this method, It simply redirects me to an edit page for the object i'm currently viewing, which is an OrgEvent__c.

 

It's almost like since i have a standard controller in scope, i'm not allowed to create a new one in this method.  Does anybody know why I can't make this work?

Here's one that I think should be easy?

 

I have an <apex:pageBlock> and I am using an <apex:facet name="header"> to make my own custom stuff in the header.

 

I just want a button in there to create a new object.  Is there an easy way to do this?  Or do I seriously need to get the object prefix for this?

 

That would be weak.

I am wondering if there is a way that I can use visualforce to create an edit page that uses the same layout from the detail page.  Inline editing is not an option for me.

 

My issue is that I have a custom edit page but when people add fields to the detail layout, I want those fields on the edit page too.

 

Something like <apex:detail mode="edit"> is sorta what I'm looking for.

 

Does anyone have any clues?

Hi,

 

My visualforce page is as follows. I would like to have the help text displayed next to my input fields.

I can't give showheader as true. So is there any other way to get the helptext bubble displayed?

 

 

 

<apex:outputpanel >

<table width="100%">
    <tr>
    <td>
        <apex:inputfield value="{!af.tdpaf.Area_of_Focus__c}" /> 
    </td>
    <td>  <apex:inputfield value="{!af.tdpaf.What_data_are_you_collecting__c}"/></td>
    <td>  <apex:inputfield value="{!af.tdpaf.Baseline__c}"/></td>
  </table>

</apex:outputpanel >

 

 

Hey folks -

 

So I have a VF page that accepts a contact ID in the URL and looks like this:

 

<apex:page standardController="Contact" extensions="AppTrackerLanding" showHeader="false">

<head>

    <style>

        #pageWrapper { width: 80%; margin: 20px auto; }

    </style>

</head>

<divid="pageWrapper">

<apex:form>

    <apex:pageBlocktitle="User Edit"mode="edit">

        <apex:pageBlockButtons>

            <apex:commandButtonaction="{!battle}"value="Battle"></apex:commandButton>

        </apex:pageBlockButtons>

        <apex:selectListvalue="{!appId}">

            <apex:selectOptionsvalue="{!applications}"/>

        </apex:selectList>

    </apex:pageBlock>

</apex:form>

</div>

</apex:page>

 

Which is made public via a site.  here's what the controller extension looks like, which handles the "battle" function (i named it battle because that's exactly what this has been)

 

public class AppTrackerLanding 

{

 

privatefinalContact c;

public String appId {get; set;}

 

public AppTrackerLanding(ApexPages.StandardController stdController) 

{

this.c = (Contact)stdController.getRecord();

}

 

public List<selectOption> getApplications() 

{

List<selectOption> options = new List<selectOption>();

for(Application__c app : 

[SELECT Id, NameFROMApplication__c 

WHERE Contact__c = : this.c.Id])

{

options.add(new selectOption(app.Id,app.Name));

}

return options;

}

 

public PageReference battle()

{

System.debug(this.appId + ' ::::: APPID');

PageReference ref = new PageReference('/apex/AppTracker?id=' + this.appId);

ref.setRedirect(true);

return ref;

}

 

So you can see here how I'm generating the list of select options and also what happens when you click 'Battle'.  It gathers the application ID from the picklist on the VF page, and redirects you to a different VF page called AppTracker and sends along the ID.

 

All I have in the AppTracker page is this:

 

 

<apex:pagestandardController="Application__c"showHeader="FALSE"sidebar="FALSE">

</apex:page>

 

If i preview the site in admin mode i get the error:

 

sObject 'Application__c' is not supported.

 

I've granted read access to all objects in the public access settings for the site.  I've added the second visualforce page to the list of pages the site has access to.  Could this have something to do with the fact that the object is part of a managed package?

 

If I do this through apex as a logged in user, it all works fine.  Does it have something to do with the record owner?  I still wouldn't understand though, since it doesn't have any trouble looking up the contact in the first page, only the second page has an issue.

 

Any help would be great.  

I'm developing a software package.  It's good to go and passes all tests when I package it as managed beta or released

 

Here's the error I'm seeing when I try to install this beta package into a sandbox in a different org  (or the released package into a non-sandbox in a different org)

 

enhancedcomponenttestsuite.testTestObject()

 

Apex Classes(XXXXX) (where XXXXX is the ID of the apex class: enhancedComponentTestSuite).

 

System.AssertException: Assertion Failed
(FormationLite)
External entry point

 

 

This isn't very informative is it?  In the test method testTestObject(), there are 40 System.assert calls.

 

Here's the crazy part though:  I commented out every single one, repackaged, and I still see this error when trying to install.  Is this error message lying to me?

 

I have no idea where to turn.  Can somebody please help me?  All I want is a meaningful error message.