• Btuitasi1
  • NEWBIE
  • 124 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 26
    Questions
  • 21
    Replies
Is possible to display a PDF file stored as a Static Resource in a visualforce page? I am creating a User Agreement page that would need to show the PDF and a form with a checkbox underneath it acknowledging their agreeement to proceed. I am thinking of creating a separate page that displays the PDF and embedding that in the master page. 

Any ideas?

Thanks!!
I am trying to write a test class for my custom controller, but am only getting 30% coverage.

Controller:

    
public with sharing class topRecordExt {
               
        public List<My_Lobby__c> getRecent2()
        {
            return [SELECT Id, Title__c, CreatedBy.Name, CreatedDate, VoteTotal__c
            FROM My_Lobby__c
            WHERE Active_Status__c = 'Active' 
            order by createdDate desc Limit 10];
        }
        public List<My_Lobby__c> getMostVoted2()
        {
            return [SELECT Id, Title__c, CreatedBy.Name, CreatedDate, VoteTotal__c 
            FROM My_Lobby__c
            WHERE Active_Status__c = 'Active' 
            order by VoteTotal__c desc, CreatedDate desc Limit 10];
        }
    public List<AggregateResult> top6Contributors1
    {
        get
        {
            if (top6Contributors1 == null)
            {
                top6Contributors1 = [
                    SELECT CreatedById, CreatedBy.Name name,
                        count(Id) contributions
                    FROM My_Lobby__c
                    GROUP BY CreatedById, CreatedBy.Name
                    ORDER BY count(CreatedById) desc limit 6
                ];
            }
            return top6Contributors1;
        }
        private set;
    }
    
        public topRecordExt() {}
          // Code we will invoke on page load.
        public PageReference forwardToCustomAuthPage() {
            if(UserInfo.getUserType() == 'Guest'){
                return new PageReference('MyCenter/MyCenterLogin');
            }
            else{
                return null;
            }
        }
    }


Test Class so far:

    
@isTest
    private class TestTopRecords {
    
        static testMethod void myUnitTest() {
             My_Lobby__c a = new Recent2(Title__c = 'Test', Active_Status__c = 'Active');
             insert a;
    
             My_Lobby__c c = new MostVoted2(Title__c = 'Test');
             insert c;
             
            My_Lobby__c d = new  top6Contributors1();
             return d;
        }
    }



Any ideas on how to get to 75%?
I am trying to create two buttons that inserts Up and Down on a record by clicking a command button. Here is my code so far:
VF Page:
 
<apex:form id="votingSection">
                       <apex:pageBlock mode="edit">
     <apex:pageBlockButtons location="bottom">
                       <apex:commandButton styleclass="btn-lg btn-data" value="Vote Up"  action="{!voteUp}" reRender="votingSection"/>
                       <apex:commandButton styleclass="btn-lg btn-data" value="Vote Down"  action="{!voteDown}" reRender="votingSection"/>
                        </apex:pageBlockButtons>
                       </apex:pageBlock>
                       </apex:form>



Extension:

  
public class detExt2 {
     
     private final my_object__c myObject;
    
    
            public detExt2() {
                myIdea = [SELECT Id, Vote_Button__c, Name FROM my_object__c
                           WHERE Id = :ApexPages.currentPage().getParameters().get('id')];
            }
         
            public my_object__c getObject() {
                return myObject;
            }
        
            public PageReference voteUp() {
                
                myIdea.Vote_Button__c = 'Up';
                update myObject;
                return null;
            }
              public PageReference voteDown() {
                
                myIdea.my_object__c = 'Down';
                update myObject;
                return null;
            }
        }



Any ideas on how to make this work? Also, I'm trying to figure out how to implement unique votes by user. 

Thanks!
I am trying to create a button to insert a text value into a field upon clicking. Here is my code:
{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")} 

var newRecords = [];  

var idLob = new sforce.SObject(“Idea_Lobby__c”);  
idLob.id =”{!Idea_Lobby__c.Id}”;                  

idLob.Vote_Test__c =(’Up‘) ; 

newRecords.push(idLob);            

result = sforce.connection.update(newRecords); 
window.location.reload();

I am getting an illegal token error when I go to click it. Any ideas on how to fix this?

Thanks!
I have a visualforce page that displays user contribution by CreatedById. Here is my controller code:
public List<AggregateResult> getTop6Contributors()
    {
        return [SELECT CreatedById, CreatedBy.Name Name  FROM Idea group by CreatedById, CreatedBy.Name order by count(CreatedById) desc limit 6];
    }
How do I display on my page the number of records a user has submitted?

Thanks!
 
I am trying to insert a record on a child object (Idea_Comments__c) of the standard controller object (Idea_Lobby__c). After insertion, I would also like it forward to a VF page. So far, I have not had any success with my page. After clicking submit, the page tries to send me to login. 

Here's my extension so far:
public with sharing class detExt {

private ApexPages.StandardController theController; 
public Idea_Comments__c ideaCom {get; set;}
public Idea_Comments__c setideaCom(Idea_Comments__c op){
this.ideaCom=op;
return ideaCom;
}

public detExt(ApexPages.StandardController acon) {

   theController = acon;
   ideaCom=new Idea_Comments__c();

 }
  public List<Idea_Comments__c> getdetExt()
    {

        ID masterID = theController.getID();

        return [SELECT Id, CreatedDate, CreatedBy.Name, Comment__c
        FROM Idea_Comments__c
        WHERE Idea_Lobby__c = :masterID
        order by CreatedDate DESC ];
    }
 public pagereference saveComments(){

Idea_Comments__c cd = new Idea_Comments__c();
cd.Comment__c=ideaCom.Comment__c;
insert cd;
PageReference congratsPage = Page.Congrats_Page;
  congratsPage.setRedirect(true);
  return congratsPage;

}
}

Any ideas on how I can get this to work?
I have a visualforce detail page that utilizes a link like: 

https://org-developer-edition.na17.force.com/MyCommunity/Page_Detail?id=a00o0000007FxHjSSK

I am trying to construct a controller that would allow me to display a record from a custom object (Idea Comments) with a master-detail relationship to the standard controller object (Idea Lobby) based on the ID of the displayed record.

Here is my extension so far:
public with sharing class detExt { 
public detExt(ApexPages.StandardController acon) { } 
public List<Idea_Comments__c> getdetExt() 
{
    return [SELECT Id, CreatedDate, CreatedBy.Name, Comment__c 
    FROM Idea_Comments__c 
    WHERE Idea_Lobby__c = 
    order by CreatedDate DESC ]; 
}
}



I only want the Idea Comment records with the master-detail relationship to the specific record to show up.

Thanks!!
I have two formula fields (UpVotes and DownVotes). When a text field (Score_Button__c) is changed to "Up" then add 1 to UpVotes. If Score_Button__c is changed to "Down" then add 1 to DownVotes. Here is what I have figured out so far:
 
IF(Score_Button__c = "Up",+ 1, null) 
After this gets assigned, I'll have a trigger reset the Score_Button__c value to a blank. My problem is that once the field gets reset, the value gets reset as well. I want to keep the +1 value that occurred before the trigger reset.

Any ideas on how to fix my formula?

Thanks!
 
I'm trying to use custom buttons to set the Vote object as "Up" or "Down". I have the buttons up, but I'm having trouble with the beginning part of the extension. I am still fairly new to apex.

Any help would be appreciated!

VF Page Sample
<apex:form >
                   <apex:commandButton styleclass="btn-lg btn-data" value="Vote Up" action="{!setValue1}"/>
                   <apex:commandButton styleclass="btn-lg btn-data" value="Vote Down" action="{!setValue2}"/>
                   </apex:form>


Extension so far
public class detailExt{
public myControllerExtension(ApexPages.StandardController stdController) {
         public Vote setVote {get; set;}

public void setValue1() {
    setVote.Type = 'Up';
    setVote.ParentId = Idea.Id;
}
public void setValue1() {
    setVote.Type = 'Down';
    setVote.ParentId = Idea.Id;
}



}
}



 
I have two buttons:
<a class="btn-lg btn-data" role="button">Vote Up</a> <a class="btn-lg btn-data"  role="button">Vote Down</a>

I need the "Vote Up" button to promote the Idea displayed on the page and the "Vote Down" button to demote the Idea.

Alternatively, I could just link the two buttons to custom number fields that would add 1 to an Up Vote field and vice versa, but I don't want users to be able to vote twice on the same Idea.

Any ideas on how to implement either? I'm fine with going the 2nd second route since it seems like an easier option. I'm still a novice when it comes to Java.

Thanks!
 
I have a page on my Force.com page that doesn't seem to be locking down based on my custom login. This is the only page that is accessible without going through the login process. Here is my code:
 
public with sharing class topIdeaExt {
           
    public List<Idea> getRecent2()
    {
        return [SELECT Id, Title, CreatedBy.Name, Voting_Status__c, CreatedDate, VoteTotal FROM Idea WHERE Voting_Status__c = 'Active' order by createdDate desc Limit 10];
    }
    public List<Idea> getMostVoted2()
    {
        return [SELECT Id, Title, CreatedBy.Name, Voting_Status__c, CreatedDate, VoteTotal FROM Idea WHERE Voting_Status__c = 'Active' order by VoteTotal desc, CreatedDate desc Limit 10];
    }
    public List<AggregateResult> getTop6Contributors()
    {
        return [SELECT CreatedById, CreatedBy.Name Name  FROM Idea group by CreatedById, CreatedBy.Name order by count(CreatedById) desc limit 6];
    }
    
    public topIdeaExt() {}
      // Code we will invoke on page load.
    public PageReference forwardToCustomAuthPage() {
        if(UserInfo.getUserType() == 'Guest'){
            return new PageReference('CostCenter/CostCenterLogin');
        }
        else{
            return null;
        }
    }
}

Any idea how I can fix this issue?

Thanks!
I have a fully visualforce styled community site with a custom login page and logout button. The login and logout functions work, but if I logout, I can still access the site by typing in the URL of a supposedly "locked down" page. How do I prevent this from happening?

Thanks!
I have a html customized visualforce page that displays idea records. I have successfully implemented everything, except for the promote/demote buttons. How would I put that in my page under each record displayed? I've searched the documentation, but haven't had any success. 

Any help would be much appreciated!

Thanks!

 
I have a visualforce page with a 2 repeaters: 
- 1 that shows an record that has an "Active" checkbox as "True" (Topic cObject)
- 1 that shows comments on the above (they are related by a master-detail relationship)

I have a form on the page that allows users to comment on the "Active" topic. How do I make it so that records created from the form automatically lookup to the topic with the "Active" checkbox marked? 

Here is my controller so far:
public with sharing class challengeDiscuss {
    // declare the instance
    public Challenge_Comment__c commentObj {get; set;}
     
    // Constructor of the class
    public challengeDiscuss(){
        commentObj = new Challenge_Comment__c();
    }
     public void saveComments(){
        // insert or update comments - depends on your requirement
        try{
            insert commentObj;
        }catch(Exception ex){
            System.debug('#### Error while inserting comments #### ' + ex.getMessage());
        }

}

    public List<Challenge__c> getRecentChallenge1()
    {
        return [SELECT Id, Name, CreatedDate, Description__c FROM Challenge__c WHERE Active__c = true order by createdDate desc Limit 1];
    }
    public List<Challenge_Comment__c> getRecentComments10()
    {
        return [SELECT Id, Name, CreatedDate, Comment__c FROM Challenge_Comment__c WHERE Challenge__r.Active__c = true order by createdDate desc, CreatedDate desc ];
    }
 
}
Also, my records don't seem to be submitting.

Any helo is much appreciated. 

Thanks!
 
I have a visualforce page that acts as a leaderboard for users. I would like the ability to show how many submissions a user has for the Idea sObject and how many times he/she has voted on any idea. How would I develop this in my custom controller?

Thanks!
I am designing a website on top of communities. My homepage dsiplays recently submitted records and top voted records (up to 10) using data repeaters. I would like to have the title of each record utilized as a link that would take the user to a visualforce landing page that shows the details of that record. Since the records on my homepage will be dynamically updated, how do I have my landing pages follow suit?

Any ideas and/or strategies?

Thanks!!
I've created a custom login page for my customer community login members. Here is my controller for the login page:
/**
 * An apex page controller that exposes the site login functionality
 */
global with sharing class CustomLoginController {
    global String username{get;set;}
    global String password{get;set;}
    global CustomLoginController () {}
    global PageReference forwardToCustomAuthPage() {
        return new PageReference( '/CostCenterLogin');
    }
    global PageReference login() {
        return Site.login(username, password, null);
    }

}

Here is the controller for my landing page:
public with sharing class topIdeaExt {
           
    public List<Idea> getRecent2()
    {
        return [SELECT Id, Title, Name__c, CreatedDate, Voting_Status__c FROM Idea order by createdDate desc Limit 2];
    }
    public List<Idea> getMostVoted2()
    {
        return [SELECT Id, Title, Name__c, CreatedDate, Voting_Status__c FROM Idea order by VoteTotal desc, CreatedDate desc Limit 2];
    }
    public List<AggregateResult> getTop6Contributors()
    {
        return [SELECT CreatedById, CreatedBy.Name Name  FROM Idea group by createdbyid, CreatedBy.Name order by count(CreatedById) desc limit 6];
    }
    
     // Code we will invoke on page load.
    public PageReference forwardToCustomAuthPage() {
        if(UserInfo.getUserType() == 'Guest'){
            return new PageReference('/CostCenterLogin');
        }
        else{
            return null;
        }
    }

    public topIdeaExt() {}
}

I've set up the login and landing pages in my communities setup and added customer community login user profile to my settings already. When I go to login as a test user, it seems to load, but it doesn't take me to the landing page.

Any ideas on how to fix this issue? I've been using this as a reference: 
http://appirio.com/category/tech-blog/2013/10/create-custom-salesforce-communities-login-landing-page/

Thanks!
I've seen the promote/demote features on the ideas page standard object and would like to use it on my custom visualforce page which displays 2 most recent ideas and 2 most voted on. How would I add this to my custom controller and visualforce page so that users can click to promote or demote an idea?

Thanks!!

Controller so far:
public with sharing class topIdeaExt {

public List<Idea> getRecent2()
    {
        return [SELECT Id, Title, Name__c, CreatedDate, Voting_Status__c FROM Idea order by createdDate desc Limit 2];
    }
    public List<Idea> getMostVoted2()
    {
        return [SELECT Id, Title, Name__c, CreatedDate, Voting_Status__c FROM Idea order by VoteTotal desc, CreatedDate desc Limit 2];
    }
    public List<AggregateResult> getTop6Contributors()
    {
        return [SELECT CreatedById, CreatedBy.Name Name  FROM Idea group by createdbyid, CreatedBy.Name order by count(CreatedById) desc limit 6];
    }
}


I am using an apex form to insert data into a custom object. My code is:
<apex:form>
<apex:pageBlock mode="edit">
      <apex:pageBlockButtons >
        <apex:commandButton action="{!save}" value="Submit" styleClass="btn blu btn-data"/>
      </apex:pageBlockButtons>
      <apex:pageBlockSection columns="1">
        <apex:inputField value="{!Comments__c.Name}"/>
        <apex:inputField value="{!Comments__c.Subject__c}"/>
        <apex:inputField value="{!Comments__c.Comments__c}"/>
      </apex:pageBlockSection>
    </apex:pageBlock>
  </apex:form>
I know this is easily done with a standard controller, but I have a repeater in use already that uses a custom controller. How would I add this capability to my custom controller?

Custom Controller:
public with sharing class challengeDiscuss {
    public List<Challenge__c> getRecentChallenge1()
    {
        return [SELECT Id, Name, CreatedDate, Description__c FROM Challenge__c order by createdDate desc Limit 1];
    }
    public List<Challenge_Comment__c> getRecentComments10()
    {
        return [SELECT Id, Name, CreatedDate, Comment__c FROM Challenge_Comment__c order by createdDate desc, CreatedDate desc Limit 10];
    }
  
}
Thanks!!


I am building a visualforce page based on Idea standard object components. I need to display the 2 most recently submitted ideas (Title, Name, Date), 2 with the most votes (Title, Name, Date), and the top 6 contributors based on number of submissions. I'm sure there is a way to do this with SOQL, but am not too sure about the syntax.

If I understand it correctly, I plug this all in my controller, then call it from my visualforce page?

Thanks for any and all help!



Hello,
I have a complete website coded and designed including all pages and a login page. I am having trouble figuring out how to "mesh" this into Salesforce as a community. I have investigated both Site.com and Force.com options. From Site.com I've imported my zip file, but the output was quite messy. A few questions I have are:

- Where do I upload the website assets so I can call them in my visualforce pages?
- How would I use our login page to align with Salesforce's login credentials as a Community User?
- How do I implement a dynamic "leaderboard" from a custom object?

I have very basic level knowledge of Java, but am very familiar with SQL and HTML.

Any help is much appreciated! Thanks!
I am trying to create a button to insert a text value into a field upon clicking. Here is my code:
{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")} 

var newRecords = [];  

var idLob = new sforce.SObject(“Idea_Lobby__c”);  
idLob.id =”{!Idea_Lobby__c.Id}”;                  

idLob.Vote_Test__c =(’Up‘) ; 

newRecords.push(idLob);            

result = sforce.connection.update(newRecords); 
window.location.reload();

I am getting an illegal token error when I go to click it. Any ideas on how to fix this?

Thanks!
I am trying to insert a record on a child object (Idea_Comments__c) of the standard controller object (Idea_Lobby__c). After insertion, I would also like it forward to a VF page. So far, I have not had any success with my page. After clicking submit, the page tries to send me to login. 

Here's my extension so far:
public with sharing class detExt {

private ApexPages.StandardController theController; 
public Idea_Comments__c ideaCom {get; set;}
public Idea_Comments__c setideaCom(Idea_Comments__c op){
this.ideaCom=op;
return ideaCom;
}

public detExt(ApexPages.StandardController acon) {

   theController = acon;
   ideaCom=new Idea_Comments__c();

 }
  public List<Idea_Comments__c> getdetExt()
    {

        ID masterID = theController.getID();

        return [SELECT Id, CreatedDate, CreatedBy.Name, Comment__c
        FROM Idea_Comments__c
        WHERE Idea_Lobby__c = :masterID
        order by CreatedDate DESC ];
    }
 public pagereference saveComments(){

Idea_Comments__c cd = new Idea_Comments__c();
cd.Comment__c=ideaCom.Comment__c;
insert cd;
PageReference congratsPage = Page.Congrats_Page;
  congratsPage.setRedirect(true);
  return congratsPage;

}
}

Any ideas on how I can get this to work?
I have two formula fields (UpVotes and DownVotes). When a text field (Score_Button__c) is changed to "Up" then add 1 to UpVotes. If Score_Button__c is changed to "Down" then add 1 to DownVotes. Here is what I have figured out so far:
 
IF(Score_Button__c = "Up",+ 1, null) 
After this gets assigned, I'll have a trigger reset the Score_Button__c value to a blank. My problem is that once the field gets reset, the value gets reset as well. I want to keep the +1 value that occurred before the trigger reset.

Any ideas on how to fix my formula?

Thanks!
 
I'm trying to use custom buttons to set the Vote object as "Up" or "Down". I have the buttons up, but I'm having trouble with the beginning part of the extension. I am still fairly new to apex.

Any help would be appreciated!

VF Page Sample
<apex:form >
                   <apex:commandButton styleclass="btn-lg btn-data" value="Vote Up" action="{!setValue1}"/>
                   <apex:commandButton styleclass="btn-lg btn-data" value="Vote Down" action="{!setValue2}"/>
                   </apex:form>


Extension so far
public class detailExt{
public myControllerExtension(ApexPages.StandardController stdController) {
         public Vote setVote {get; set;}

public void setValue1() {
    setVote.Type = 'Up';
    setVote.ParentId = Idea.Id;
}
public void setValue1() {
    setVote.Type = 'Down';
    setVote.ParentId = Idea.Id;
}



}
}



 
I have a fully visualforce styled community site with a custom login page and logout button. The login and logout functions work, but if I logout, I can still access the site by typing in the URL of a supposedly "locked down" page. How do I prevent this from happening?

Thanks!
I have a html customized visualforce page that displays idea records. I have successfully implemented everything, except for the promote/demote buttons. How would I put that in my page under each record displayed? I've searched the documentation, but haven't had any success. 

Any help would be much appreciated!

Thanks!

 
I have a visualforce page that acts as a leaderboard for users. I would like the ability to show how many submissions a user has for the Idea sObject and how many times he/she has voted on any idea. How would I develop this in my custom controller?

Thanks!
I am designing a website on top of communities. My homepage dsiplays recently submitted records and top voted records (up to 10) using data repeaters. I would like to have the title of each record utilized as a link that would take the user to a visualforce landing page that shows the details of that record. Since the records on my homepage will be dynamically updated, how do I have my landing pages follow suit?

Any ideas and/or strategies?

Thanks!!
I've created a custom login page for my customer community login members. Here is my controller for the login page:
/**
 * An apex page controller that exposes the site login functionality
 */
global with sharing class CustomLoginController {
    global String username{get;set;}
    global String password{get;set;}
    global CustomLoginController () {}
    global PageReference forwardToCustomAuthPage() {
        return new PageReference( '/CostCenterLogin');
    }
    global PageReference login() {
        return Site.login(username, password, null);
    }

}

Here is the controller for my landing page:
public with sharing class topIdeaExt {
           
    public List<Idea> getRecent2()
    {
        return [SELECT Id, Title, Name__c, CreatedDate, Voting_Status__c FROM Idea order by createdDate desc Limit 2];
    }
    public List<Idea> getMostVoted2()
    {
        return [SELECT Id, Title, Name__c, CreatedDate, Voting_Status__c FROM Idea order by VoteTotal desc, CreatedDate desc Limit 2];
    }
    public List<AggregateResult> getTop6Contributors()
    {
        return [SELECT CreatedById, CreatedBy.Name Name  FROM Idea group by createdbyid, CreatedBy.Name order by count(CreatedById) desc limit 6];
    }
    
     // Code we will invoke on page load.
    public PageReference forwardToCustomAuthPage() {
        if(UserInfo.getUserType() == 'Guest'){
            return new PageReference('/CostCenterLogin');
        }
        else{
            return null;
        }
    }

    public topIdeaExt() {}
}

I've set up the login and landing pages in my communities setup and added customer community login user profile to my settings already. When I go to login as a test user, it seems to load, but it doesn't take me to the landing page.

Any ideas on how to fix this issue? I've been using this as a reference: 
http://appirio.com/category/tech-blog/2013/10/create-custom-salesforce-communities-login-landing-page/

Thanks!
I am using an apex form to insert data into a custom object. My code is:
<apex:form>
<apex:pageBlock mode="edit">
      <apex:pageBlockButtons >
        <apex:commandButton action="{!save}" value="Submit" styleClass="btn blu btn-data"/>
      </apex:pageBlockButtons>
      <apex:pageBlockSection columns="1">
        <apex:inputField value="{!Comments__c.Name}"/>
        <apex:inputField value="{!Comments__c.Subject__c}"/>
        <apex:inputField value="{!Comments__c.Comments__c}"/>
      </apex:pageBlockSection>
    </apex:pageBlock>
  </apex:form>
I know this is easily done with a standard controller, but I have a repeater in use already that uses a custom controller. How would I add this capability to my custom controller?

Custom Controller:
public with sharing class challengeDiscuss {
    public List<Challenge__c> getRecentChallenge1()
    {
        return [SELECT Id, Name, CreatedDate, Description__c FROM Challenge__c order by createdDate desc Limit 1];
    }
    public List<Challenge_Comment__c> getRecentComments10()
    {
        return [SELECT Id, Name, CreatedDate, Comment__c FROM Challenge_Comment__c order by createdDate desc, CreatedDate desc Limit 10];
    }
  
}
Thanks!!


I am building a visualforce page based on Idea standard object components. I need to display the 2 most recently submitted ideas (Title, Name, Date), 2 with the most votes (Title, Name, Date), and the top 6 contributors based on number of submissions. I'm sure there is a way to do this with SOQL, but am not too sure about the syntax.

If I understand it correctly, I plug this all in my controller, then call it from my visualforce page?

Thanks for any and all help!



Hey guys,
I am trying to create visualforce pages from existing HTML code I have. Here is my apex so far:

<apex:page showHeader="false" standardStylesheets="false" sidebar="false">
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" href="../../assets/ico/favicon.ico">

    <title>Login into the blah blah</title>

    <!-- Bootstrap core CSS -->
    <link href="css/bootstrap.css" rel="stylesheet">
    <link href="css/overrides.css" rel="stylesheet">
    <link href="css/login.css" rel="stylesheet">

    <!-- Just for debugging purposes. Don't actually copy this line! -->
    <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>

  <body>
    <div id="perc-container">
    <div id="header">
      <div class="secondary-nav" style="background-color: #fff;"> 
        <div class="container">
          <div class="row">
            <div class="col-lg-12" style="background-color: white;"> 
                <button class="show-search">Search</button>
                <div class="global-search">
                    <form class="global-search-inner">
                    <input type="text" class="search-main"> 
                    <input type="submit" class="search-main-submit" value="" >
                    <span class="search-icon"></span> 
                    </form>
                                  
                </div>
                <ul class="nav navbar-nav">
                    <li><a href="#">About Us</a></li>
                    <li><a href="#">Contact Us</a></li>
                     <li><a href="#">Visit Us</a></li>
                </ul>
            </div>               
          </div>
        </div>
      </div>
      <div class="primary-nav">
        <div class="container">
          <div class="row">
            <div class="col-lg-12">
                <div class="navbar-header">
                  <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                  </button>
                  <a href="#" class="mobile-search-btn hidden-lg"></a>
                  <a class="navbar-brand logo" href="#"></a>
                  <a href="" class="mobile-login hidden-lg">Login</a>
                </div>
                <div class="mobile-search hidden-lg clearfix">
                    <div class="global-search">
                        <form class="global-search-inner">
                        <input type="text" class="search-main"> 
                        <input type="submit" class="search-main-submit" value="" >
                        </form>                                  
                    </div>
                </div>
                <div class="collapse navbar-collapse">
                  <ul class="nav navbar-nav">
                    <li class="active"><a href="#">Home</a></li>
                    <li><a href="#about">Stuff</a></li>
                    <li><a href="#contact">Stuff</a></li>
                    <li><a href="#about">Submit Your Stuff</a></li>
                    <li><a href="#contact">Make an Appointment</a></li>
                   
                  </ul>
                </div><!--/.nav-collapse -->
              </div>
            </div>
          </div>
        </div>
    </div><!-- /#header -->

    <div id="main" class="landing">      
      
      <div class="section welcome-ctr">
        <div class="container">
            <div class="row">                 
                <div class="col-lg-12">
     <div class="backg-art">
    <img src="images/StuffLogo.png" alt="Stuff">
  
      <div class="form-contain">
        <form class="form-login" role="form">
          <input type="username" class="form-control" placeholder="username" required autofocus>
          <input type="password" class="form-control" placeholder="password" required>
          <button class="btn btn-sm btn-primary btn-block forgot-password btn-width btn-shade" type="submit">Login</button>
          <label class="forgot-password"><a href="#">Forgot Password</a></label>
          <label class="checkbox">
            <input type="checkbox" value="remember-me">
            Remember me</label>
        </form>
      </div>
    </div>
                   <!-- /.row --> 
                                    
                </div>
                                
            </div>                       
        </div>
      </div><!-- /.section -->  

    </div><!-- /#main -->
    <div id="footer" class="section">
        <div class="container hidden-xs">
            <div class="row"> 
                <div class="special-col">
                    <h2>Quick Links</h2>
                    <li><a href="#">Home</a></li>
                    <li><a href="#">Stuff</a></li>
                    <li><a href="#">Discussion</a></li>
                    <li><a href="#">Submit Your Stuff</a></li>
                    <li><a href="#">Our Process</a></li>
                    <li><a href="#">About Us</a></li>
                    <li><a href="#">Site Map</a></li>
                </div>
                <div class="special-col">
                    <h2>Stufforate</h2>
                    <li><a href="#">About Us</a></li>
                    <li><a href="#">Site Map</a></li>
                    <li><a href="#">Stuffs</a></li>
                    <li><a href="#">Legal</a></li>
                    <li><a href="#">Contact Us</a></li>
                    <li><a href="#">Privacy Policy</a></li>
                    <li><a href="#">Stuff Store</a></li>
                </div> 
               
               
            </div>                       
        </div>
        <div class="container visible-xs">
                <div class="row">
                    <div class="panel-group" id="accordion">
                              <div class="panel panel-default">
                                <div class="panel-heading">
                                  <h2 class="panel-title"><a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">Quick Links<span></span></a></h2>
                                </div>
                                <div id="collapseOne" class="panel-collapse collapse">
                                  <div class="panel-body">
                                  <li><a href="#">Home</a></li>
                    <li><a href="#">Stuff</a></li>
                    <li><a href="#">Discussion</a></li>
                    <li><a href="#">Submit Your Stuff</a></li>
                    <li><a href="#">Our Process</a></li>
                    <li><a href="#">About Us</a></li>
                    <li><a href="#">Site Map</a></li>
                                  </div>
                                </div>
                              </div>
                              <div class="panel panel-default">
                                <div class="panel-heading">
                                  <h2 class="panel-title"><a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo">Stuff Solutions<span></span></a></h2>
                                </div>
                                <div id="collapseTwo" class="panel-collapse collapse">
                                  <div class="panel-body">
                                      <li><a href="#">About Us</a></li>
                    <li><a href="#">Site Map</a></li>
                    <li><a href="#">Stuff</a></li>
                    <li><a href="#">Legal</a></li>
                    <li><a href="#">Contact Us</a></li>
                    <li><a href="#">Privacy Policy</a></li>
                    <li><a href="#">Stuff Store</a></li>
                                  </div>
                                </div>
                              </div>
                              
                            </div>
                </div>
            
        </div>
        <div class="container">
            <div class="row"> 
                <p class="copyright">©2014 Stuff Services, Inc.</p>
            </div>                       
        </div>
    </div><!-- /.footer -->
    <div id="video-modal" role="dialog" class="modal fade">     
            <div class="modal-content">
            <button type="button" class="close" data-dismiss="modal"><span>x</span></button>        
            <video autoplay src=""></video>
            </div> 
    </div>
    </div>
    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="js/lib/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/settings.js"></script>
  </body>
</html>

</apex:page>

I get the following error:
Error: StuffCenterLogin line 24, column 4: The element type "link" must be terminated by the matching end-tag "</link>"
Error Error: The element type "link" must be terminated by the matching end-tag "</link>".

Any ideas?
I'm new to visualforce

Thanks!
Hey guys,

I have created a workflow that changes a field in Ideas from "Open" to "Locked" after 30 days. Now, I would like to create a trigger that would actually lock the record making it read-only. How would I call the record type in my trigger? Here is my code so far:

Trigger IdeaRecordLock on Idea (after update, after insert) {
  for (Idea a : Trigger.New) {
    if (a.Voting_Status__c == 'Locked') {
   // the remaining code would go in and change the record to read-only. Admins and standard users would be the only ones able to edit.

Any ideas?

Thanks guys!
Hey guys,
I am writing a trigger to create a new record in Idea from an existing record in one of our custom objects. Here is my code:

trigger backToIdea on Idea_Lobby__c (after update) {
for (Idea_Lobby__c yourIdea : Trigger.new) {

if (yourIdea.Approval__c == 'Approved')
{
        Idea backAgain      = new Idea();
        backAgain.Name__c   = yourIdea.Name__c;
        backAgain.Location__c = yourIdea.Location__c;
        backAgain.Company__c = yourIdea.Company__c;
        backAgain.Title = yourIdea.Name;
        backAgain.Body = yourIdea.Idea_Body__c;
        insert backAgain;
}
else if(yourIdea.Approval__c == 'Delete')
{
  Idea_Lobby__c y = new Idea_Lobby__c();
        y.Id = yourIdea.Id;
        delete y;
        }
}
}


Since Zone is a required field, I get an error when the trigger fires. Does anyone know the API name for Zone in the Idea object, so I can set it when the new record is created?

Thanks!