When logging into a Community as a User via the Contact record the {!$User.Id} token contained within a Visualforce page contained withinan a Home Page Component displayed via an iFrame it shows my ID rather than the ID of the person I am masquerading as.

I want to grab the Contact Records associated with CampaignMember records that meet a particular criteria.

If APEX/SOQL supported DISTINCT I would run the following query:

Select Id,Name from Contact Where ID IN
(Select DISTINCT ContactID from CampaignMember where SomeCondition = true)

I would not be too concerned with needing Distinct except the secondary query is too large without it.

I tried the statement above and using the Group By statement which (when run by itself) returns unique results however the IN clause does not seem to support grouped results and throws an error.

Perhaps there is a better way for me to go about this? I anticipate that the number of CampaignMember records that meet the criteria is aproximatly 75000 but they only repersent around 15,000 unique Contact records.

If I knew that I wanted to change the Account with a particular ID's Email field to 'someone@someemail.com' is there a way to do so without looping through the results or worse executing a SOQL query for that specific record.?

Based on certain criteria I would like to hide the results from the DataBlockTable. For example if Revenue__c < 300.

I know this could be done by changing the SOQL query to filter the results so the list just does not contain the unwanted values. However I would prefer to keep the list as is and filter on the VisualForce side. Is there a syntax to use render within a DataBlockTable so it will conditionally show the rows?

I have VP/Apex Class that updates a record.When the page first loads it grabs the first record that meets a particular criteria.

Here is the code that runs when the record is submitted. What should happen is upon submission it should update a checkbox (and some other fields) and then set the PageReference to the same page and then reload that page.

One of the criteria for the selected record is that the Resume Review Completed field should be false therefore after a submission the current record should drop out. (which it does if I reload manually)

I tried using code similar to whats presented in the iFrame Target example on here: http://www.w3schools.com/html/html_iframe.asp but on my browser (Firefox) it opens a new tab. Even when I copy and paste the example from the preceding link into my visualForce page it insists on opening a new tab in my browser.

How should I be doing this? (having a link open the iFrame as a target is an exceptable solution for me)

I have run queries against it and can see records which contain non-null values and fields listed as null values in Real Force Explorer Query Tool.

I have been using the syntax myfield__c != null but that does not filter out any of the values which appear to be empty. I also tried syntax myfield__c != '' for kicks but neither seems to filter out the records.

My next step is to reach out to the community to see if perhaps I need to be doing something different to evaluate null formula values in SOQL or if there is a function to check the length of a text field (so I can check for a length greater than 1 for example)

Imagine that I have 2 columns and a very large field that stretches quite a bit vertically. Instead of having lots of dead space on the right I would like to be able to place several columns of information.

I have a pretty good idea how I would solve this if I was using straight HTML, but I do like the ease and styling afforded when using Visualforce tags. What is your reccomendation for providing displaying a 2 column display of information similar to what I described above?

If this were straight HTML I could create 2 divs side by side populate the left with the large field and the right side with a table with several rows. (is there a way to accomplish this easily and still continue to use Visualforce tags and VisualForce styling? I suspect if I add Divs and put VF elements in a smaller space then intended it will result in some messed up formatting.

Is there a way via APEX or VisualForce to select (override) the detail layout when displaying a detail tag in Visualforce?

I want to create a specific detail page layout just for this particular page, however I would prefer to build it declaratively rather than having to build it field (or fieldset) by field in Visualforce.

I would like to display a different set of elements from an object depending on picklist value. If this were PHP and I could not use Case statements I might do something like:

If (myPicklistValue=='Value1')
{
// My webform fields to display if the value is 1
}
If (myPicklistValue=='Value2')
{
// My webform fields to display if the value is 2
}
﻿
If (myPicklistValue=='Value3')
{
// My webform fields to display if the value is 3
}

I'd like to do something similar on a Visualforce page. Check the value of the picklist. If its equal to value1 then display a set of page and block elements etc...

As a company with over 100 tabs in total we use the traditional concept of "Apps" extensively to control the list of tabs by business process and application. Am I missing something, or is the Salesforce1 product currently lacking the same basic kind of strcuture functionality. How do I create a structured Nav menu in Salesforce1?

Recent tabs is not a solution to my needs, and the Mobile Navigation customization is not designed to easily support basic tabs and is only globally customizable.

Based on certain criteria I would like to hide the results from the DataBlockTable. For example if Revenue__c < 300.

I know this could be done by changing the SOQL query to filter the results so the list just does not contain the unwanted values. However I would prefer to keep the list as is and filter on the VisualForce side. Is there a syntax to use render within a DataBlockTable so it will conditionally show the rows?

I have VP/Apex Class that updates a record.When the page first loads it grabs the first record that meets a particular criteria.

Here is the code that runs when the record is submitted. What should happen is upon submission it should update a checkbox (and some other fields) and then set the PageReference to the same page and then reload that page.

One of the criteria for the selected record is that the Resume Review Completed field should be false therefore after a submission the current record should drop out. (which it does if I reload manually)

I tried using code similar to whats presented in the iFrame Target example on here: http://www.w3schools.com/html/html_iframe.asp but on my browser (Firefox) it opens a new tab. Even when I copy and paste the example from the preceding link into my visualForce page it insists on opening a new tab in my browser.

How should I be doing this? (having a link open the iFrame as a target is an exceptable solution for me)

I have run queries against it and can see records which contain non-null values and fields listed as null values in Real Force Explorer Query Tool.

I have been using the syntax myfield__c != null but that does not filter out any of the values which appear to be empty. I also tried syntax myfield__c != '' for kicks but neither seems to filter out the records.

My next step is to reach out to the community to see if perhaps I need to be doing something different to evaluate null formula values in SOQL or if there is a function to check the length of a text field (so I can check for a length greater than 1 for example)

Imagine that I have 2 columns and a very large field that stretches quite a bit vertically. Instead of having lots of dead space on the right I would like to be able to place several columns of information.

I have a pretty good idea how I would solve this if I was using straight HTML, but I do like the ease and styling afforded when using Visualforce tags. What is your reccomendation for providing displaying a 2 column display of information similar to what I described above?

If this were straight HTML I could create 2 divs side by side populate the left with the large field and the right side with a table with several rows. (is there a way to accomplish this easily and still continue to use Visualforce tags and VisualForce styling? I suspect if I add Divs and put VF elements in a smaller space then intended it will result in some messed up formatting.

The problem is the Stage variable only shows 10 of the values however there should be 21 available options. The Status is dependent on the Stage and so far as I can see the statuses show up properly based on the currently selected Stage.

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.

I have noticed that the button does not seem to be calling the method as I don't see any of my debug statements. So that may be the issue.

NOTE: I eventually did resolve the problem using the wrapper based solution. One thing that was causing a problem for me was also this line of code:

<apex:inputCheckbox value="{!psi.id}" />

While it did not generate an error it would not allow any command buttons to properly call the APEX methods. Turns out its not a good idea to bind a checkbox to a read only field as I did in this case :) .I fixed this using code similar to what was presented below in the solution by incorporating the wrapper and binding the checkbox to a boolean field.

I have a sites page that is not part of the navigation that I would like to preview in Admin mode. How do I preview that specifc page in Admin mode.

Right now I am getting an Authorization Required message which is not very useful for debugging purposes. I have tried logging the public user but even then the logs don't tell me which field or script etc... that the public user does not have access to that is generating the run time error.

I have a page reference that returns me to the object the user started on. It works great, except the URL is still the Visualforce page. It was my understanding that setRedirect(true) accomplished this. I know it used to work like this, but at some point this functionliaty changed and it no longer updates the url.

Anyone know how I can accomplish the URL to be updated with my page reference? It's causing some minor confusion when people "refresh" and end up going to the VF page they just left.