• Carson Huang
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 4
    Replies
Hi guys,

So what's happening is that I have two VF pages right now: a login page and an another VF page. Right now, a user can bypass the login page simply by writing the url for the second VF page. Is there any way to redirect the user to the login page if he's not logged in? I have already written the code to verify whether a user is logged in or not for the controller of the 2nd VF page. However, I am not able to redirect him, since that would require me to load the 2nd VF page first.

Thanks a lot!
Hi,

Here is my code sample

<apex:page showHeader="false">
	<style>
        html, body {
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
        }
        #form-wrapper {
        width: 30%;
        position:absolute;
        left:35%;
        top:35%;
        padding: 0;
        }
    </style>
	<body id="body" style="background:-webkit-linear-gradient(top,rgb(137,150,160) 0%, rgb(255,255,255) 90%);">
        	<apex:form>
                <div id="form-wrapper">
                    <apex:pageBlock >
                        <apex:pageBlockSection columns="1" >
                            <apex:inputText label="Username" style="margin-left:45%"  />
                            <apex:inputSecret label="Password" style="margin-left:45%" />  
                            <apex:commandButton value="Login" style="margin-left:45%"/>
                        </apex:pageBlockSection>
                    </apex:pageBlock>
                </div>
        	</apex:form>
    </body>
</apex:page>

And this is what I see:

User-added image

Can someone explain to me what I am doing wrong? Thank you!
Hi guys,

I'm trying to add a picklist to the VF page. However, when using Input Field, I only get the picklist field of 1 option. How do I get all theoptions?

<apex:pageBlock title="Access Details">
            <apex:pageBlockSection columns="2" >
                     <apex:inputField label="Family" value="{!rec.Family__c}" />
            </apex:pageBlockSection>
</apex:pageBlock>

Hi,

I'm new to Apex so please bear with me.

Is there a way to call a trigger when a user gets freezed/unfreezed?

Basically, every time someone freezes/unfreezes a user, I want a trigger to be called that'll create a record on the change (this, I already have. I just need to be able to create a record when this change happens).

Thanks in advance!
I am a beginner in Apex and VisualForce, having started only learning it last week. I am looking for a way to use an external HTML page, not on the force.com platform, to create a user. Basically, after submitting, the information on that html page will be sent (in whatever ways) to create a user on the force.com platform. Can anyone give me any leads on how I may accomplish this?
Hi guys,

I'm trying to add a picklist to the VF page. However, when using Input Field, I only get the picklist field of 1 option. How do I get all theoptions?

<apex:pageBlock title="Access Details">
            <apex:pageBlockSection columns="2" >
                     <apex:inputField label="Family" value="{!rec.Family__c}" />
            </apex:pageBlockSection>
</apex:pageBlock>

I am trying to write a simple trigger for a custom field update(text to text)

trigger UpdateCompanyOverviewField on Trip_Report__c (before insert) {
    for( Trip_Report__c obj: trigger.new){
        if(Company_Name__c=Name){
            Company_Over__c = Company_Overview__c;
        }
    }
}

error: Variable does not exist: Company_Over__c

I am stumpmed as the API name for Company_Over__c checks out. Any help please
  • September 17, 2014
  • Like
  • 0