• tdep
  • NEWBIE
  • 75 Points
  • Member since 2011

  • Chatter
    Feed
  • 3
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 16
    Questions
  • 26
    Replies
Currently looking for a candidate for a Development position that must be strong in the following areas:

- APEX, VF Development
- Workflow Management
- Process Automation
- Financial Analysis
- SFDC Administration

Located in Midtown Manhattan / New York, NY and this is for a Fortune 500 company seat. I am not a recruiter and am not looking for consulting firms.

Please contact me/send your resume to 200NYCDev@gmail.com (mailto:200NYCDev@gmail.com?subject=Job%20Posting) (gmail used to filter applicants).

Thanks,
  • April 11, 2014
  • Like
  • 0

I have been using force IDE for awhile now but never understood this:

 Whenever I open fofce IDE it shows previous errors that arose when making updates to the code - even though these were all fixed.

 

Everytime I open the software I have to go to each class or trigger and refresh from the server to get it to go away.

 

Is there a way to update the saved project file so I don't have to do this everytime I open it?

 

Thanks in advance.

  • August 14, 2013
  • Like
  • 0

Hoping someone has ran into this issue before, cant find anything when searching.

 

I am having an issue with outputting a VF page to PDF with a nested Datatable. Below is the nested datatable portion of the page, everything renders fine in html but gives the 'PDF generation failed. Check the page markup is valid' error. If I remove the inner datatable it will render in PDF.

 

Anyone know of any workarounds to make this output?

 

<apex:dataTable value="{!unitnames}" var="a" rendered="{!unitnames != null}" style="margin-left:20px;">
    
    <apex:column >
    
    <table style="margin-bottom:-2px;border:1px solid #000;border-spacing:0px;margin-top:15px;">
    <tr>
    <td style="height:25px;width:129px;background-color:#69be28;font-weight:bold;text-align:center;">{!a}</td>
    </tr>
    </table>
    
<apex:dataTable value="{!personnel}" var="p" style="border-bottom:1px solid #000;" > <apex:column headerValue="Name" headerClass="hcheaderleft" rendered="{!p.City_Unit_Name__c == a}"> <apex:outputText value="{!p.Personnel_Name__c}" rendered="{!p.City_Unit_Name__c == a}" /> </apex:column> <apex:column headervalue="Office Title" headerClass="hcheader" rendered="{!p.City_Unit_Name__c == a}"> <apex:outputText value="{!p.Office_Title__c}" rendered="{!p.City_Unit_Name__c == a}" /> </apex:column> <apex:column headervalue="Service Title" headerClass="hcheader" rendered="{!p.City_Unit_Name__c == a}" > <apex:outputText value="{!p.Civil_Service_Title__c}" rendered="{!p.City_Unit_Name__c == a}" /> </apex:column> <apex:column headervalue="Job Classification" headerClass="hcheader" rendered="{!p.City_Unit_Name__c == a}"> <apex:outputText value="{!p.Job_Classification__c}" rendered="{!p.City_Unit_Name__c == a}" /> </apex:column> <apex:column headervalue="Status" headerClass="hcheader" rendered="{!p.City_Unit_Name__c == a}"> <apex:outputText value="{!p.Status__c}" rendered="{!p.City_Unit_Name__c == a}" /> </apex:column> </apex:dataTable> </apex:column> </apex:dataTable>

 Thanks in advance

  • December 13, 2012
  • Like
  • 0

Just tinkering around with some dataTables and when I add rowclasses it is messing up the output of the table.

 

.row1 {height:20px;}
.row2 {height:20px;}

.row1:hover {background-color:#EBDDE2;}
.row2:hover {background-color:#EBDDE2;}

There are 2 as one will change.

 

<apex:dataTable rowClasses="row1,row2" value="{!needs}" var="n" rendered="{!selectedunitid != null}">
<apex:column headerClass="needsthwide" headervalue="Dimensions">
<apex:outputField styleClass="needst" value="{!n.Dimensions__c}" rendered="{!n.Category__c == 'Reception and Waiting Area'}" />
</apex:column>
<apex:column headerClass="needsth" headervalue="Qty">
<apex:inputField styleClass="needstinput" value="{!n.Quantity__c}" rendered="{!n.Category__c == 'Reception and Waiting Area'}" />
</apex:column>
<apex:column headerClass="needsth" headervalue="Square Feet">
<apex:inputField styleClass="needstinput" value="{!n.SF__c}" rendered="{!n.Category__c == 'Reception and Waiting Area'}" />
</apex:column>
</apex:dataTable>

Without the rowClasses parameter the table works fine. When I add the parameter on it shows all rows from the query... But where the rendered eval does not = true it will just hide the data, but show the row.

 

Example: (When rowClasses is present) 5 records in {!needs} and 1 is Category__c = 'Reception and waiting Area'. It will show 4 blank rows and 1 row with data.

 

Thanks in advance

 

  • September 12, 2012
  • Like
  • 0

I am currently having an issue with a dynamic list that has the ability to add rows as needed. This functionality is working fine but I am running into an issue with the deletion of rows.

 

The user has the ability to add 1 row or 25 rows. Each row has the ability to be removed from the entry page. Issue is when they add 25 rows (or even a few) and delete a row in the middle of the list then go to delete a higher value row it will produce the list out of bounds error.

 

Example: User adds 25 rows. They need to delete row 15 and 20. User removed 15 first and when they go to delete 20 it crashes with a list out of bounds exception.

 

I understand why it does this but am trying to figure out how to re-assign index values once the list is modified.

 

Here is the delete method as it stands right now:

    public void DelPersonnel()
    {   system.debug('selected row index---->'+selectedRowIndex);   
         if(count != 1) //Prevent crash on remove 1
        {
             lstInner.remove(Integer.valueOf(selectedRowIndex)-1);
             //something needs to go here to change the row values!  
             count = count - 1;
             numpersonnel = numpersonnel - 1;
        }
    }

 

I am assuming I need to add a for loop to reassign row index values over the deleted - can anyone assist? I am unsure on how to change the index value.

 

Thanks in advance

  • August 27, 2012
  • Like
  • 0

I have a simple class that redirects the browser to a third party site when they access a specific portal page. I have no idea how to setup a test for this, can anyone assist?

 

Here is the code:

public with sharing class analyticsforward {

 public PageReference redirect() {
        
            PageReference homePage = new PageReference('URL Removed for Post');
            homePage.setRedirect(true);
            return homePage;
                }


        
}

 Thanks in advance

  • June 11, 2012
  • Like
  • 0

Hi,

 

I currently have a for loop inside a Selectlist to gather items within that field. Is there a way to combine multiple values that are the same? So only 1 value shows in the dropdown rather than 2? Is there a way to truncate multiple values into 1?

 

Example: Change Management is on 2 records in the system but I only want to show 1 on the drop-down/selectList.

 

 

Here is the SelectList I am using

public List<SelectOption> getItems() {
List<SelectOption> options = new List<SelectOption>();

options.add(new selectOption('', '- None -'));

for (Object r : [select FIELDNAME from Object])
{
options.add(new selectOption(r.FIELDNAME, r.FIELDNAME));
}

return options;
}

 

Thanks in advance


  • March 01, 2012
  • Like
  • 0

I am currently creating a page that is going to be used to track headcount in various locations.

 

They use the following control fields to select:

Location/State

Site

 

Is there a way to query the Location/Site field (currently a Text field) and convert it to a selectList or a drop-down type function I can use to filter queries?

 

The reason this is needed is that locations/states and sites are going to be added/removed frequently and it would be a huge headache to hard-code this as it will roll out to multiple clients.

 

I see some things on Describe but I am unsure on how to use it.

 

Any help would be greatly appreciated, thanks in advance!

 

  • March 01, 2012
  • Like
  • 0

Hi,

 

I currently have a small form that a user can input 4 fields for a new entry into the database. Everything works fine when I remove the "Unique" check for dupes on the Email field. But if I have it enabled, it jumps to the auth required screen.

 

As you can see below, the class is very simple and functions properly if a user inputs a new entry that does not exist. How can I check against unique at the insert? Or should I be doing a field validation rule? Not sure which is the best path to take.

 

public class addbrokerclass 
{
	public Broker_Contact__c newBroker { get; set; }
		
	public addbrokerclass() 
	{ 
	newBroker = new Broker_Contact__c();
	}
	
	public PageReference add() {
		insert newBroker;
		return new PageReference('/survey/landing');
                            }
}

 Thanks in advance!

  • February 27, 2012
  • Like
  • 0

Hi,

 

I am currently working on a visualforce page that is going to be used in a sites email campaign. Turns out Opportunity does not work well with sites so I need some help taking my query of Opportunity and placing values into string fields (or list, whichever works).

 

Opportunity record ID is passed through the email so that is used in the query, also keeps it limited to 1 per page so that should make it easier to deal with.

 

Here is a shot of how I am querying:

 

public with sharing class rrdipus {

//Collect Opportunity ID to use in query
public string uniqueID = System.currentPagereference().getParameters().get('q'); 
public string getUniqueID() { return uniqueID; }

public list<Opportunity> getDetails() 
{
		return [SELECT Project_Street__c, Project_City__c, Project_State__c, Project_Zip__c, Proj_Country__c, Proj_Expiration__c, Proj_RSF__c
                FROM Opportunity
                WHERE Id = :uniqueID ];

}

}

As for the VF apge, I know how to display everything needed - just confused how to get those values returned in the query to a string field.

 

Example: I would like to take Project_Street__c and place it into a string field called thestreet or something like that.

 

Thanks in advance,

  • February 21, 2012
  • Like
  • 0
I have a trigger that compiles a related object (US_Comments__c) up to the parent record (US_Projects__c).
Everything works fine but I have to populate the CommentCompilation__c field initially which has resulted in an annoying little . at the beginning on each compilation.
Part giving me an issue:
a.CommentCompilation__c = '.';
I have tried to initiate the value as null, '', "", etc. and nothing works. Anyone have a tip on how to initiate it and then possibly remove that entry? or a value that will display as blank?

here is the full trigger for reference:
trigger CommentCompilationUSProject on US_Project__c (before update) {

for(US_Project__c a:[select id,
                             (select id,Name,Source__c,Comments__c from US_Comments__r ORDER BY CreatedDate DESC)
                                from US_Project__c where id in :trigger.new]) 
{    
    a.CommentCompilation__c = '.';
    
    for(US_Comments__c o:a.US_Comments__r)
     
    a.CommentCompilation__c += ' \n ' + o.Name + ' - ' + o.Source__c + ' - ' + o.Comments__c + ' \n ';
    //String.valueOf(o.Comments__c)
    Trigger.newMap.get(a.id).CommentCompilation__c = a.CommentCompilation__c;
  }
  
}
 

 Thanks in advance!

  • January 31, 2012
  • Like
  • 0

Hi,

 

I am currently in the process of building a custom ui which allows for mass edit of records from a resultset.

 

I currently have the edit form wrapped in a DataTable and all fields are hard-coded.

 

My question is: Is there a way to setup a way to allow users to select which fields they will be editting?

 

I am not sure if DataTable is the correct approach to this. Everything is working in terms of hard code, but I wanted to know if there is something more dynamic.

 

Ideal situation: User gets a selection criteria (like the old report editting pages were setup, checkbox per field to display) then click next to get to the edit form containing only the fields they selected.

 

 

Thanks,

  • January 30, 2012
  • Like
  • 0

Hi,

 

I am currently having an issue with the rendered attribute for an outputpanel. I currently have it check against an inputfield to see if it is blank.

 

It works with 1 condition: <apex:outputPanel rendered="{!LEN(address)<1}"  >

 

But if I want to add in an additional OR || statement to check for {!LEN(city)<1} than it breaks.

 

I tried the following:

 

<apex:outputPanel rendered="{!LEN(address)<1} || {!LEN(city)<1}">

<apex:outputPanel rendered="{!LEN(address)<1} OR {!LEN(city)<1}">

<apex:outputPanel rendered="{!LEN(address) || !LEN(city) <1}">

<apex:outputPanel rendered="{!LEN(address) OR !LEN(city) <1}">

 

I am probably missing something super simple. Any help would be greatly appreciated. 

 

Thanks in advance!

  • January 24, 2012
  • Like
  • 0

I currently am having an issue with grabbing a value from a query (result is only 1) and posting it into a field (Seperate Objects with no relation).

 

Here is the code I have been testing with:

 

for (Towers_Watson_Project__c a : Trigger.new)
{
	String projtype =  a.Project_Type__c;
	String stage =  a.Stage__c;	
	String theid = projtype + '-' + stage;  
  
	TW_Process__c[] test = [SELECT Name, Description__c FROM TW_Process__c WHERE Name =: theid ];
	
	//String descrip = test[0].Description__c;
	a.TriggerTestUpdate__c = test[0].Description__c;
}

 If I put a string rather than '=: theid' for the WHERE clause, example 'TEST123' then it works fine. This is the first real trigger I'm trying to write and am a bit lost.

 

Pretty much just looking for how to convert the query result into a string, not exactly sure how to accomplish.

 

Any help would be greatly appreciated, thanks in advance.

 

Also, this is a Before Update trigger.

  • September 09, 2011
  • Like
  • 0

I am currently having an issue building a simple trigger to update a parent record with the record ID of a child. We use a survey system to write into the child object and now we want to pull the latest ID to the parent to use in an email template the same way the survey is sent out originally.

 

Parent Object: Portfolio__c

Child Object: BOV__c

 

Any help would be greatly appreciated.

 

Right now I am just playing around with the query and can't get it to work correctly.

 

Edit: Right now using SOQL query I can simulate the query needed with;

 

Select b.Id, b.Portfolio__c, b.Portfolio__r.Name from BOV__c b WHERE b.Portfolio__r.Name != '' (I just used blank to check if I can pull the ID)

 

I'm just confused on how to initiate this to pull the latest once it has been written in.

 

Thanks in advance :)

  • April 26, 2011
  • Like
  • 0

Hey devforce,

 

Hope you enjoyed cloudforce 2011 if you attended (I know I did) :)

 

I am having an issue with a VF page I have created. I use a ?q={ID} for a query at the end of the URL to pull the project data for display. Below the user can add "Prospects" as related records to the main project.

 

It works when the page initially loads and writes it to the correct record but then after the first submission the URL changes to not have the ?q= string attached.

 

I'm not sure how to post the url back up or keep the variable stored without updating it again.

 

Thanks in advance,

 

Controller:

 

 

public with sharing class USPS_Prospects 
{

public USPS_Prospects__c newProspect { get; set; }
public USPS_Project__c newProject { get; set; }
public USPS_Project__c proj { get; set; }

public string uniqueID = System.currentPagereference().getParameters().get('q');

public string getUniqueID()
{
return uniqueID;
}


public list<USPS_Prospects__c> getUSPSProspects()
{
return [SELECT Id, Name, USPS_Project__c, Status__c, Comments__c, CreatedInfo__c
FROM USPS_Prospects__c
WHERE USPS_Project__c = :uniqueID ];
}

public USPS_Prospects() {
newProspect = new USPS_Prospects__c(USPS_Project__c = uniqueID);
}

public PageReference add() {
insert newProspect;
return null;
}
public PageReference getTest() {

proj = [ SELECT Id, Name, Street__c, State__c, Country__c, City__c, Square_Feet__c, Expiration_Date__c, Facility_Type__c
FROM USPS_Project__c
WHERE Id = :uniqueID ];
return null;
}


public list<USPS_Project__c> getUSPSProjects()
{
return [SELECT Id, Name, Street__c, State__c, Country__c, City__c, Square_Feet__c, Expiration_Date__c, Facility_Type__c
FROM USPS_Project__c
WHERE Id = :uniqueID ];
}

/*-------------------*/
/* Test Method */
/*-------------------*/

public static testMethod void USPS_Prospects()
{

USPS_Prospects controller = new USPS_Prospects();

USPS_Prospects__c testProspect = new USPS_Prospects__c
(
Name = 'Test',
Comments__c = 'Comments Information Placeholder',
Status__c = 'Tour'
);

controller.add();
controller.getUSPSProspects();

USPS_Project__c testProject = new USPS_Project__c
(
Name = 'TestProj',
Street__c = 'Street',
State__c = 'State',
Country__c = 'Country',
City__c = 'City',
Square_Feet__c = 1000,
Facility_Type__c = 'Office'
);

insert testProject;
controller.getUSPSProjects();

string uniqueID;
uniqueID = 'test123';
controller.getUniqueID();
}


}

 Page:

 

 

 

<apex:page controller="USPS_Prospects" sidebar="false" showHeader="false" cache="false" expires="900" title="USPS - Disposition Prospects"   >

<apex:image url="https://c.na3.content.force.com/servlet/servlet.ImageServer?id=01550000000qyIQ&oid=00D300000000XQU&lastMod=1297701458000" />

<input name="key" value="{!uniqueID}"/>

<apex:dataTable value="{!USPSProjects}" var="projectlist" cellpadding="2" border="1">

<apex:column headerValue="Project Information" width="250">
<table>
<tr> <td align="right"> <strong> Address: </strong> </td>
<td> <apex:outputText value="{!projectlist.Street__c}" /> </td> </tr>
<tr> <td align="right"> <strong> City: </strong> </td>
<td> <apex:outputText value="{!projectlist.City__c}" /> </td> </tr>
<tr> <td align="right"> <strong> State: </strong> </td>
<td> <apex:outputText value="{!projectlist.State__c}" /> </td> </tr>
<tr> <td align="right"> <strong> Country: </strong> </td>
<td> <apex:outputText value="{!projectlist.Country__c}" /> </td> </tr>
<br />
<tr> <td align="right"> <strong> Facility Type: </strong> </td>
<td> <apex:outputText value="{!projectlist.Facility_Type__c}" /> </td> </tr>
<tr> <td align="right"> <strong> Size (SF): </strong> </td>
<td> <apex:outputText value="{!projectlist.Square_Feet__c}" /> </td> </tr>
<tr> <td align="right"> <strong> Expiration: </strong> </td>
<td> <apex:outputText value="{!projectlist.Expiration_Date__c}" /> </td> </tr>
</table>

</apex:column>

</apex:dataTable>


<apex:pageBlock title="Add New Prospect">
<apex:form >
<table>
<tr> <td> Name: </td> <td> <apex:inputText value="{!newProspect.Name}" /> </td> </tr>
<tr> <td> Status: </td> <td> <apex:inputField value="{!newProspect.Status__c}" /> </td> </tr>
<tr> <td> Comments: </td> <td> <apex:inputText value="{!newProspect.Comments__c}" size="100" /> </td> </tr>
</table> <apex:commandButton value="Add" action="{!add}" />
</apex:form>
</apex:pageBlock>


<apex:pageBlock title="Previous Submissions">
<apex:form >
<apex:dataTable value="{!USPSProspects}" var="prospectlist" cellpadding="2" border="1">

<apex:column headerValue="Name" width="100">
{!prospectlist.name}
</apex:column>

<apex:column headerValue="Status" width="100">
{!prospectlist.Status__c}
</apex:column>

<apex:column headerValue="Comments" width="300">
{!prospectlist.Comments__c}
</apex:column>

<apex:column headerValue="Created Date" width="50">
{!prospectlist.CreatedInfo__c}
</apex:column>

<apex:column headerValue="Test ProjectID" width="50">
{!prospectlist.USPS_Project__c}
</apex:column>

</apex:dataTable>

</apex:form>
</apex:pageBlock>

</apex:page>

 

 

 

  • March 04, 2011
  • Like
  • 0

I have been using force IDE for awhile now but never understood this:

 Whenever I open fofce IDE it shows previous errors that arose when making updates to the code - even though these were all fixed.

 

Everytime I open the software I have to go to each class or trigger and refresh from the server to get it to go away.

 

Is there a way to update the saved project file so I don't have to do this everytime I open it?

 

Thanks in advance.

  • August 14, 2013
  • Like
  • 0

I've been trying to use the Excel Connector for the last two weeks to manage the data in our organisation, but I'm having a problem where I get the following error in Excel which is preventing me from using this tool:

 

Error Generated by request::An internal server error has occured while processing your request.
Url:https://www.salesforce.com/services/Soap/c/13.0

ExceptionCode : 5103

The first couple of times I tried to use Excel Connector it worked fine. However I then started seeing this error every time I tried to use it - the error appears after I put in my password in Excel Connector and click Login.

 

We are on Salesforce Professional. I have tried uninstalling and reinstalling the toolkit and connector, but it hasn't made a difference. I'm using Excel 2010 32-bit on Windows 7 64-bit.

 

I can log in to Salesforce in my browser on the same computer.

 

I've checked that IE is not in Offline Mode, and verified that Excel can actually connect to the internet (pinged a URL using VBA script).

 

I've tried disabling my antivirus (MSE) and windows firewall.

 

I've tried changing the server url as suggested by this thread (had to modify registry keys to do this as that field was not editable in the connector.

 

None of these resolutions worked.

 

Has anyone experienced and managed to resolve this, or can anyone suggest any other possible resolutions?

Hoping someone has ran into this issue before, cant find anything when searching.

 

I am having an issue with outputting a VF page to PDF with a nested Datatable. Below is the nested datatable portion of the page, everything renders fine in html but gives the 'PDF generation failed. Check the page markup is valid' error. If I remove the inner datatable it will render in PDF.

 

Anyone know of any workarounds to make this output?

 

<apex:dataTable value="{!unitnames}" var="a" rendered="{!unitnames != null}" style="margin-left:20px;">
    
    <apex:column >
    
    <table style="margin-bottom:-2px;border:1px solid #000;border-spacing:0px;margin-top:15px;">
    <tr>
    <td style="height:25px;width:129px;background-color:#69be28;font-weight:bold;text-align:center;">{!a}</td>
    </tr>
    </table>
    
<apex:dataTable value="{!personnel}" var="p" style="border-bottom:1px solid #000;" > <apex:column headerValue="Name" headerClass="hcheaderleft" rendered="{!p.City_Unit_Name__c == a}"> <apex:outputText value="{!p.Personnel_Name__c}" rendered="{!p.City_Unit_Name__c == a}" /> </apex:column> <apex:column headervalue="Office Title" headerClass="hcheader" rendered="{!p.City_Unit_Name__c == a}"> <apex:outputText value="{!p.Office_Title__c}" rendered="{!p.City_Unit_Name__c == a}" /> </apex:column> <apex:column headervalue="Service Title" headerClass="hcheader" rendered="{!p.City_Unit_Name__c == a}" > <apex:outputText value="{!p.Civil_Service_Title__c}" rendered="{!p.City_Unit_Name__c == a}" /> </apex:column> <apex:column headervalue="Job Classification" headerClass="hcheader" rendered="{!p.City_Unit_Name__c == a}"> <apex:outputText value="{!p.Job_Classification__c}" rendered="{!p.City_Unit_Name__c == a}" /> </apex:column> <apex:column headervalue="Status" headerClass="hcheader" rendered="{!p.City_Unit_Name__c == a}"> <apex:outputText value="{!p.Status__c}" rendered="{!p.City_Unit_Name__c == a}" /> </apex:column> </apex:dataTable> </apex:column> </apex:dataTable>

 Thanks in advance

  • December 13, 2012
  • Like
  • 0

I am currently having an issue with a dynamic list that has the ability to add rows as needed. This functionality is working fine but I am running into an issue with the deletion of rows.

 

The user has the ability to add 1 row or 25 rows. Each row has the ability to be removed from the entry page. Issue is when they add 25 rows (or even a few) and delete a row in the middle of the list then go to delete a higher value row it will produce the list out of bounds error.

 

Example: User adds 25 rows. They need to delete row 15 and 20. User removed 15 first and when they go to delete 20 it crashes with a list out of bounds exception.

 

I understand why it does this but am trying to figure out how to re-assign index values once the list is modified.

 

Here is the delete method as it stands right now:

    public void DelPersonnel()
    {   system.debug('selected row index---->'+selectedRowIndex);   
         if(count != 1) //Prevent crash on remove 1
        {
             lstInner.remove(Integer.valueOf(selectedRowIndex)-1);
             //something needs to go here to change the row values!  
             count = count - 1;
             numpersonnel = numpersonnel - 1;
        }
    }

 

I am assuming I need to add a for loop to reassign row index values over the deleted - can anyone assist? I am unsure on how to change the index value.

 

Thanks in advance

  • August 27, 2012
  • Like
  • 0

What are the options to implement customized login page for standard salesforce.com application users (not customer/partner portal users)?

Hi,

 

I currently have a for loop inside a Selectlist to gather items within that field. Is there a way to combine multiple values that are the same? So only 1 value shows in the dropdown rather than 2? Is there a way to truncate multiple values into 1?

 

Example: Change Management is on 2 records in the system but I only want to show 1 on the drop-down/selectList.

 

 

Here is the SelectList I am using

public List<SelectOption> getItems() {
List<SelectOption> options = new List<SelectOption>();

options.add(new selectOption('', '- None -'));

for (Object r : [select FIELDNAME from Object])
{
options.add(new selectOption(r.FIELDNAME, r.FIELDNAME));
}

return options;
}

 

Thanks in advance


  • March 01, 2012
  • Like
  • 0

I am currently creating a page that is going to be used to track headcount in various locations.

 

They use the following control fields to select:

Location/State

Site

 

Is there a way to query the Location/Site field (currently a Text field) and convert it to a selectList or a drop-down type function I can use to filter queries?

 

The reason this is needed is that locations/states and sites are going to be added/removed frequently and it would be a huge headache to hard-code this as it will roll out to multiple clients.

 

I see some things on Describe but I am unsure on how to use it.

 

Any help would be greatly appreciated, thanks in advance!

 

  • March 01, 2012
  • Like
  • 0

Hi,

 

I currently have a small form that a user can input 4 fields for a new entry into the database. Everything works fine when I remove the "Unique" check for dupes on the Email field. But if I have it enabled, it jumps to the auth required screen.

 

As you can see below, the class is very simple and functions properly if a user inputs a new entry that does not exist. How can I check against unique at the insert? Or should I be doing a field validation rule? Not sure which is the best path to take.

 

public class addbrokerclass 
{
	public Broker_Contact__c newBroker { get; set; }
		
	public addbrokerclass() 
	{ 
	newBroker = new Broker_Contact__c();
	}
	
	public PageReference add() {
		insert newBroker;
		return new PageReference('/survey/landing');
                            }
}

 Thanks in advance!

  • February 27, 2012
  • Like
  • 0

Hi,

 

I am currently working on a visualforce page that is going to be used in a sites email campaign. Turns out Opportunity does not work well with sites so I need some help taking my query of Opportunity and placing values into string fields (or list, whichever works).

 

Opportunity record ID is passed through the email so that is used in the query, also keeps it limited to 1 per page so that should make it easier to deal with.

 

Here is a shot of how I am querying:

 

public with sharing class rrdipus {

//Collect Opportunity ID to use in query
public string uniqueID = System.currentPagereference().getParameters().get('q'); 
public string getUniqueID() { return uniqueID; }

public list<Opportunity> getDetails() 
{
		return [SELECT Project_Street__c, Project_City__c, Project_State__c, Project_Zip__c, Proj_Country__c, Proj_Expiration__c, Proj_RSF__c
                FROM Opportunity
                WHERE Id = :uniqueID ];

}

}

As for the VF apge, I know how to display everything needed - just confused how to get those values returned in the query to a string field.

 

Example: I would like to take Project_Street__c and place it into a string field called thestreet or something like that.

 

Thanks in advance,

  • February 21, 2012
  • Like
  • 0

Hi,

 

I am currently in the process of building a custom ui which allows for mass edit of records from a resultset.

 

I currently have the edit form wrapped in a DataTable and all fields are hard-coded.

 

My question is: Is there a way to setup a way to allow users to select which fields they will be editting?

 

I am not sure if DataTable is the correct approach to this. Everything is working in terms of hard code, but I wanted to know if there is something more dynamic.

 

Ideal situation: User gets a selection criteria (like the old report editting pages were setup, checkbox per field to display) then click next to get to the edit form containing only the fields they selected.

 

 

Thanks,

  • January 30, 2012
  • Like
  • 0