• Diane Roberts 3
  • NEWBIE
  • 5 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
I'm sure that this is something very simple that I'm missing in my SOQL structure. My current code is:
public class NewActionListController {
    
public List<ACT_Action__c> getnewActions() { 
        List<ACT_Action__c> results = Database.query(
        'SELECT ID, Name FROM ACT_Action__c'
            'WHERE username=:UserInfo.getUserName()');
    return results;
}
}

I am getting an error that says the following:
Extra ')', at 'WHERE username=:UserInfo.getUserName()'

Can someone help? Thanks!
Hi,
I have created a Visualforce Page titled NewActionListView.vfp. The code is listed below:
<apex:page controller="NewActionListController">
     <apex:pageblock title="User Actions List" id="actions_list"> 
        <apex:repeat var="act" value="{! newActions }" rendered="true"  id="action_list"  >
            <li>
                <apex:outputLink value="/{!act.ID}" >
                    <apex:outputText value="{! act.Name}"/>
                </apex:outputLink>
            </li>
        </apex:repeat>        
    </apex:pageblock>
</apex:page>

The controller - NewActionListController.apxc referenced is listed below:
public class NewActionListController {
    
public List<ACT_Action__c> getnewActions() { 
        List<ACT_Action__c> results = Database.query(
        'SELECT ID, Name FROM ACT_Action__c');
    return results;
}
}

It creates a simple listing from a custom object ACT_Action__c. 

I am trying to insert it into my Lightning App ACT Tracker. However, when I go to add a Visualforce Page, I don't see the NewActionListView page listed. Is there something else that I need to add to my code?
Thanks!
 
Even after removing the necessary fields it says make sure you have removed the correct fields from the layout. I think some kind of bug is causing this issue and its really annoying. Before it said partner account layout could not be found and now this. Attached are the screenshots of the error message and my layout page. Kindly fix this or if thers a way around it let me know.

User-added image

User-added image

Rating
Region
Zone
Has Support Plan
Support Plan Expiration Date 

These are the fields which were asked to remove in the challenge for this layout.