• Jim Boudreaux
  • NEWBIE
  • 188 Points
  • Member since 2008

  • Chatter
    Feed
  • 7
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 78
    Questions
  • 132
    Replies

I am trying to draw a line on a VF page that I can adjust the thickness of.  I have tried the following:

 

<hr size="7" /> and <hr height="20">

 

But the line thickness seems to stay the same regardless of what values I use.   Any help would be appreciated.

Thank You.

I know I'm missing something but why can't I create a custom controller?

 

<apex:page controller="MyController" > 
<apex:pageBlock title="Contacts">
</apex:pageBlock>
</apex:page>

 

In the tutorial is says if I put that code in a Page and hit save, I'll have a Controller option available but I don't.  I get an error message "Error: Apex class 'MyController' does not exist."  What am I missing here?

 

I'm on SalesForce Pro if that makes a difference.

 

Thanks

I created a managed package that includes a custom picklist for Account. I installed the package in my production org, but the custom Account picklist is read only (greyed out in the edit view). I am System Admin and I've checked all the normal permission culprits but I can't figure it out. 

Any ideas?

According to our OEM Partner contract, 

 

13.1 “Admin User” means a subscription that may be used by the applicable Reseller Customer
only to configure and administer the OEM Service in support of such Reseller Customer’s use of
the Combined Solution. An Admin User may not be used to access, distribute, or use any CRM
functionality. CRM functionality is defined as access to CRM standard objects through standard tabs,
related lists in custom tabs, through the SFDC web services API or through reports and dashboards. CRM

standard objects include campaigns, leads, opportunities, cases, solutions and forecasts.

 

Does an Admin User have access to...

    ...Accounts?

    ...Contacts?

    ...Custom Objects?

 

Hey, check me out!

 

public string getOrdinal(integer i){
        string num = string.valueof(i);
        string suffix = 'th';
        string ordinal = '';
        i = integer.valueof(num.right(2));
        if(10 < i && i < 14) {
            ordinal =  num + suffix;
        }else{
            string onesDigit = num.right(1);
            if(onesDigit == '1'){
                suffix = 'st';
            }else if(onesDigit == '2'){
                suffix = 'nd';
            }else if(onesDigit == '3'){
                suffix = 'rd';
            }
            ordinal = num+suffix;
        }
        return ordinal;
    }

 :D

I am a force.com developer tasked with developing a simple tableview app for iOS and Android. I want to develop the app myself, but I am facing a time crunch. 

I am now willing to pay someone to guide me through the process of getting a basic skeleton app up and running. I can take it from there. This is the app I want:

 

User logs in with their SF credentials and is presented with a list of custom object records, in the form of a table view with a disclosure button. Tapping the disclosure button gives them a detail view where they can edit and save. Tapping the list item drills down into a list of child custom object records with the same edit/drill down options. This goes 3-4 levels deep until the final list of records without disclosure buttons which just brings you to the detail page when tapped. Only the last list has an "Add" button for creating new records.

 

This is the basic functionality I am after. I have been working on it myself, but I am a total Objective-C n00b and I need help. 

 

Please contact me at jboudreaux@criticalsystems.us with the subject of this post as your email subject. Thanks.

My company is looking for someone with experience with Android app development to help with the creation of an app to connect to force.com orgs.

 

One of the requirements is that some UI elements, such as picklist values, be influenced by values from a custom object called Settings__c and its related lists.

 

Please send inquiries to jboudreaux@criticalsystems.us

I started a new project using the Native Force.com REST App template that comes with the Mobile SDK. I am building a very simple nested tableview app similar to how the Salesforce Mobile App works, you start with a tableview showing a list of Totalreport__c records, tapping one navigates you to a tableview of related Inspection__c records, tapping one navigates you to a tableview of related Result__c records, tapping one navigates you to a detail page for that record. 
Here is the tricky part. I want to display a picker view on the Result__c detail page, the contents of which are build from Device_Type__c records. Mind you, records, not the values of a picklist on a custom object, actual records. The picker view should use the Name field as the label and the Id field as the value and the selected option should be stored in a lookup field in the Result__c record. (Basically I want to present the user with a picker view interface for a lookup field on a custom object)
What I am doing right now isn't working. In the ResultTableViewController.m viewDidLoad method I am using a SFRestRequest to query the server to return the chosen Inspection__c record's related Result__c records and in the same method I am also using an SFRestRequest to query the Device_Type__c records. (I am doing it here because I need the value of a field in the chosen Inspection__c record to use in the Where clause of the Device_Type__c query.)
The problem lies in the fact that even though I have two different SFRestRequests, there is only one request didLoadResponse method that handles both, and therefore I only get back one jsonResponse, either with the Result__c records, or the Device_Type__c records.

How do I split them up and handle them separately?

 

Code:

- (void)viewDidLoad
{
    [super viewDidLoad];
    self.title = inspectionName;
    
    //Result__c query being concatenated to include the Inspection__c Id
    NSString *resultSelect =@"SELECT ID, Name, Mobile_1__c, Number__c, Type__c, Location__c, System_Type_Id__c, Floor_Name__c FROM Result__c WHERE Device_Class__c != 'Subcomponent' AND Inspection__c = '";
    NSString *resultQuery = [resultSelect stringByAppendingString:[inspectionId stringByAppendingString:@"' ORDER BY Floor_Order__c"]];

    //Result__c query sent
    SFRestRequest *resultRequest = [[SFRestAPI sharedInstance] requestForQuery: resultQuery];
    [[SFRestAPI sharedInstance] send:resultRequest delegate:self];

    //Device_Type__c query being concatenated to include the System_Type_Id__c Id
    NSString *deviceTypeSelect =@"SELECT Id, Name FROM Device_Type__c WHERE Class__c != 'Subcomponent' AND System_Type__c = '";
    NSString *deviceTypeQuery = [deviceTypeSelect stringByAppendingString:[inspectionSystemTypeId stringByAppendingString:@"' Order by Name"]];
    
    //Device_Type__c query sent
    SFRestRequest *deviceTypeRequest = [[SFRestAPI sharedInstance] requestForQuery: deviceTypeQuery];
    [[SFRestAPI sharedInstance] send:deviceTypeRequest delegate:self];
    
}


#pragma mark - SFRestAPIDelegate
- (void)request:(SFRestRequest *)request didLoadResponse:(id)jsonResponse {
    NSArray *records = [jsonResponse objectForKey:@"records"];
    NSLog(@"request:didLoadResponse:# of records: %d", records.count);
    NSLog(@"request:Description:%@",records.description);
    
    //Results to display in the ResultTableView
    self.dataRows = records;
    //Trying to figure out a way to put the response records of the Device_Type__c query into the deviceType NSArray. This obviously doesn't work and is where I need help
    deviceTypes = records;
    [self.tableView reloadData];
}

 

 

I have been through all the docs and googled everything I can find and I still can't find an answer. 

 

When you create a new project in XCode 4.5 using the  Native Force.com REST App template, there is no option to use Storyboards, XCode 4.5's version of XIB files. Having created a new project without them, I added a storyboard file manually and set it up in the project's Summary tab as the Main Storyboard, and yet it gets ignored. I am not sure what I am supposed to do as there is no documentation on using storyboards anywhere.

 

Any insight?

Here's the scenario:

I have a pageblocktable with a list of custom objects. In the first column I have an edit link with the id of the item. Using jquery a dialog box is created when the user clicks the link. The dialog box has the fields of the custom object with the idea being the user can make changes and save via the dialog box. Right now I accomplish this by using Javascript remoting to call a method in the controller that returns the record the user selected when clicking the edit button. In my Javascript I must then explicitely set the values of all the input fields on the dialog box so when the box is rendered it has the current values of the record.

My question is, Is there a way to retrieve the record and set it to an sobject variable in the controller and expose that variable to the inputfields in the Dialog box? If I use the above example and set the value of the variable in the remote action function, the inputfields do not update. I think it's because the variable must be static for the remote action method to see it.

Any advice?

I need to write a SOQL query that returns opportunities based on the Stage field. I could do that easily, however, it's not the name or label of the picklist value I need to filter, it's the type. The Stage field could have many different values, some of which have a Type 'Closed/Won' and I want to return opportunities with a stage of type 'Closed/Won', how would I write a Where clause for that?

I have a selectradio tag with 5 options. FOr some reason the right most option gets squished up while the other four are equally spaced. Is there a was to override the width of selectoptions so I can change it to 20%?

If I have a Custom Controller and VisualForce page with a PageBlockTable and InlineEditSupport, what do I need to do to save the changes to multiple records in my PageBlockTable?

 

I tried 

public PageReference SaveTiers(){
        update tiers;
        setup(fields.id);
        return null;
    }

 where tiers is a list<tier__c> and setup() grabs the list of tier__c and fills tiers. THe thing is, I got this working at one point, but after a refresh it quit working and now I can't get it to work at all.

 

I would post all my code, but it would just confuse more because it is complicated and calls a lot of outside classes. Suffice to say, all I want to know is how would I write a function that saves the changes to a list of records that were changed via the inlineediting ui in a pageblocktable?

 

Can JavaScript on a VisualForce page assign values to Apex Controller variables?

 

I have an outputpanel which calls a javascript funtion when clicked. Part of my app requires a variable to get a value when the outputpanel is clicked. I would use the actionsupport or param to assign the value to the variable, but this causes a page refresh or an ajax refresh, neither of which I want. What would be ideal is if the js function I call when clicking the outputpanel could input the value to the variable.

 

Is this possible, or is that what JavaScript Remoting in Spring11 all about?

Is there a permissions issue with custom fields in a Developer Edition Site? I made a simple little visualforce page that displays the name standard field as well as a couple custom fields. It works fine in the org, but despite setting all the public permissions correctly, when I try to view the page on the site, the only field that is rendered is Name.

 

http://imfromthepast-developer-edition.na8.force.com/properties?id=a01C000000OeqM8

 

 

<apex:page Controller="Property" showHeader="false">
    <div style="margin:auto; width:1000px;">
        <div style="width:100%; float:left;">
            <div style="width:170px; float:left;">
                <apex:image value="{!URLFOR($Action.Attachment.Download, logo)}"/>
            </div>
            <div style="width:800px; height:100px; float:left; line-height:180px; text-align:right; font-size: 10pt">
                HOME | PHOTO GALLERY | FLOOR PLANS | AMENITIES | LOCATION | LEASING | RESIDENTS
            </div>
        </div>
        <div style="width:100%; float:left;">
            <div style="width:170px; height:362px; float:left; color:white; border: 0px solid #c0c0c0; padding:0px; text-align:left; background:#9c9b8d">
                <div style="border-bottom:2px solid white; padding:10px; font-size:15pt">View Community</div>
                <div style="border-bottom:1px dashed black; margin:5px; padding:5px 5px 5px 10px">HOME</div>
                <div style="border-bottom:1px dashed black; margin:5px; padding:5px 5px 5px 10px">PHOTO GALLERY</div>
                <div style="border-bottom:1px dashed black; margin:5px; padding:5px 5px 5px 10px">FLOOR PLANS</div>
                <div style="border-bottom:1px dashed black; margin:5px; padding:5px 5px 5px 10px">AMENITIES</div>
                <div style="border-bottom:1px dashed black; margin:5px; padding:5px 5px 5px 10px">LOCATION</div>
                <div style="border-bottom:1px dashed black; margin:5px; padding:5px 5px 5px 10px">LEASING</div>
                <div style="border-bottom:1px dashed black; margin:5px; padding:5px 5px 5px 10px">RESIDENTS</div>
            </div>
            <div style="width:780px; float:left; border: 1px solid #c0c0c0; margin-left:5px; padding:5px">
                <apex:repeat value="{!property.attachments}" var="a">
                    <apex:image value="{!URLFOR($Action.Attachment.Download, a.id)}"/>
                </apex:repeat> 
            </div>
            <div style="width:780px; height:100px; float:left; border: 1px solid #c0c0c0; margin-left:0px; padding:5px"> 
                {!property.overview__c}
            </div> 
            <div style="width:163px; height:100px; float:left; border: 1px solid #c0c0c0; margin-left:0px; padding:5px"> 
                <apex:outputtext value="{!property.name}"/><br/>
                <apex:outputtext value="{!property.street__c}"/>
            </div>          
        </div>
    </div>   
</apex:page>

 

public class Property {
    string id = apexpages.currentpage().getparameters().get('id');
    public property__c getProperty() {
        return [select name,street__c, city__c, features__c, state__c, zip__c, overview__c, phone__c, fax__c, (select id from attachments where name = 'Image.jpeg') from property__c where id = :id];
    }
    public string getLogo(){
        return [select id from Attachment where parentid = :id and name = 'logo.png'].id;
    }

}

 

 

 

When I use pageblocks and pageblocksections and outputfields, etc, I do not get the new Salesforce Look and Feel that I get when I view a standard SF page or when I use <apex:detail/>.

 

Why is that? Is there a way around that?

Am I doing something wrong or does the InLineEditSupport Tag not work with Field Sets?

I am writing a custom Class. It has a bunch of properties. In one constructor, when I pass one argument, an ID. It fills 1/3 of the properties. in another constructor, I pass a record ID as well as an associated record's ID as arguments. The constructor fills all the properties.

My question is this: Is there a way in the constructor with two arguments, to just call the one argument constructor and thus have 1/3 of the properties filled for free? As of this writing I am accomplishing this by instantiating a new instance of the class, and using dot notation to manually fill the properties that the one argument constructor filled. This seems rather pointless and redundant.

 

Here is my code as is:

public class MyFloor2{
        //Properties
        public floor__c                   floor     {get; set;}
        public attachment                 a         {get; set;}
        public string                     floorplan {get; set;}
        public blob                       file      {get; set;}
        public boolean                    noFA      {get; set;}
        public boolean                    noFX      {get; set;}
        public boolean                    noSH      {get; set;}
        public boolean                    noFP      {get; set;}
        public account_c__c               account   {get; set;}
        public list<FA_Device__c>         fadevices {get; set;}
        public list<FA_Result__c>         faresults {get; set;}
        public list<FX_Result__c>         fxresults {get; set;}
        public list<SH_Result__c>         shresults {get; set;}
        public list<SObject>              results   {get; set;}
        public list<floor_tenant__c>      tenants   {get; set;}
        
        //Constructors         
        public MyFloor2(){
        }
        
        public MyFloor2(string id){
            //This code utilizes a class I wrote that mimics the SQL Select * functionality. Suffice to say it represents a Select All query 
            string floorfields = new selectall('floor__c').allfields;
            string fadevicequery = 'Select '+ new selectall('fa_device__c').allfields +' from fa_devices__r order by device_number__c';
            string tenantquery   = 'Select '+ new selectall('floor_tenant__c').allfields +' from floor_tenants__r order by name';
            string floorquery ='Select '+floorfields+', ('+fadevicequery+'), ('+tenantquery+'), (Select Id From Attachments Where name = \'floorplan.jpg\') From floor__c where id=:id';
            
            floor = database.query(floorquery);
            string aid = floor.account__c;
            account = database.query(new selectall('account_c__c').soql+' where id=:aid');
            fadevices = floor.fa_devices__r;
            noFA = fadevices.isempty();
            tenants = floor.floor_tenants__r;
            if(floor.Attachments.isempty()){
                noFP = true;
            }else{
                a = floor.Attachments;
                floorplan = a.id;                
            }
        }
        
        public MyFloor2(string id, string sid){
            //This code utilizes a class I wrote that mimics the SQL Select * functionality. Suffice to say it represents a Select All query            
            string faresultquery = 'Select '+ new selectall('fa_result__c').allfields +' from fa_results1__r where system_inspection__c =:sid order by device_number__c';
            string fxresultquery = 'Select '+ new selectall('fx_result__c').allfields +' from fx_results__r where system_inspection__c =:sid order by number__c';
            string shresultquery = 'Select '+ new selectall('sh_result__c').allfields +' from sh_results__r where system_inspection__c =:sid order by device_number__c';
            string floor ='Select ('+faresultquery+'), ('+fxresultquery+'), ('+shresultquery+') From floor__c where id=:id';
            MyFloor2 myf2 = new MyFloor2(id);
            floor__c f = database.query(floor);
           
            this.floor = myf2.floor;
            this.fadevices = myf2.fadevices;
            this.tenants = myf2.tenants;
            this.floorplan = myf2.floorplan;
            this.account = myf2.account;
            
            this.faresults = f.fa_results1__r;
            this.fxresults = f.fx_results__r;
            this.shresults = f.sh_results__r;
            this.noFA = this.faresults.isempty();
            this.noFX = this.fxresults.isempty();
            this.noSH = this.shresults.isempty();
        }
        //Methods
        //....

 

 

I want to display on a visualforce page the standard related lists that come with a Contact.

So far I've succeeded with:

 

  <apex:relatedList subject="{!contact}" list="openactivities"/>
  <apex:relatedList subject="{!contact}" list="notesandattachments"/>

 But darned if I can figure out the list name of HTML Email Status or Activity History. Is there some way of ascertaining the Child Relationship name of a given standard related list? Because I assure you, 

 

 

  <apex:relatedList subject="{!contact}" list="activityhistory"/>
  <apex:relatedList subject="{!contact}" list="htmlemailstatus"/>

 does not work.

 

Hey everyone.

When I first started developing on the Force.com platform I was pretty miffed to discover there was no SOQL equivalent to the SQL SELECT * query to return data from all your fields.

I was told the thing to do was to use the SQOL Explorer app to generate a SELECT statement with all your fields, then Copy & Paste it into your apex. That works well.

 

Until your boss asks you to add a field and display it on a VF page, and now you've got to go to the sandbox, add the field tot he object, add it to your SOQL queries in Apex, go back to the Production Org and add the field there, and finally deploy to production.

I don't know about you, but after this tedious task is complete, my boss will inevitably think of yet another field he wants added and I get to reenact the whole process again.

 

I don't know if I am just late to the table on this, but I have finally stumbled upon a way out of this scenario. The key is Dynamic Apex mixed with Dynamic SOQL.

 

I created a Class called SelectAll. It has two properties, AllFields and SOQL (both Strings). It can be instantiated with one variable, a string representing the name of the SObject you wish to query. So instead of writing out an inline SOQL statement with all fields spelled out and running the risk of breaking it when you add a field, you can do this:

 

MyCustomObject__c mco = Database.query(new selectall('MyCustomObject__c').soql);

 The above Code is equivalent to this:

 

MyCustomObject__c mco = [select Id, address_picker__c, Name,quote_date__c,ownerid, expiration_date__c, system_inspection__c, CreatedDate, CreatedById, Account__c, Additional_Cost__c, Client__c, Contact__c, Grand_Total__c, Has_Change_Order__c, Name_Link__c, Name__c, Project_name__c, Quote_Name__c, Quote_Number__c, Revision__c, Sold__c, Source_Quote__c, Tax__c, Type__c, Total__c, Full_Project_Name__c, Suite__c from MyCustomObject__c];
    

 If you want to writ a join, or for whatever reason you want just a list of fields, use the allfields property as opposed to the soql property.

 

If you like what you see and think you might want to try it out here is the source code:

 

SelectAll Class:

 

public class SelectAll{
    
    public string allfields;
    public string SOQL;
    
    public selectall(){
    }
    
    public SelectAll(string sfo){
        map<string, schema.sobjecttype> allSObjects = schema.getglobaldescribe();
        schema.sobjecttype q = allsobjects.get(sfo);
        schema.describesobjectresult d = q.getdescribe();
        map<string, schema.sobjectfield> m = d.fields.getmap();
        set<string> s = m.keyset();
        string query = '';
        for(string f : s){
            query = query+f+', ';
        }
        query = query.substring(0,query.length()-2);
        this.allfields = query;
        this.SOQL = 'SELECT ' + query + ' FROM ' + sfo;
    }
}

 Here is a VF Page and a Custom Controller you can use to verify that it works:

 

VF Page:

 

<apex:page controller="dynamicsqltest">
    {!query}
</apex:page>

 

 

Custom Controller:

 

public class dynamicsqltest {
    public selectall mco = new selectall('MyCustomObject__c');
    public string getquery(){
        string q = this.mco.soql;
        return q;
    }
}

 

The above VF Page will display the SOQL statement that is generated when the name of the SObject is passed to it when you instantiate the SelectAll Class. If you really want to see it in action, after you have the VF page up and running, go add a custom field to your SObject and refresh the VF Page to verify that the new field is in the SOQL statement.

 

 

 

 

 

How does one use javascript to create a salesforce object, like an attachment, fill some fields and insert the object?

What is the deal with vf pages rendered as pdf and css? Some pretty standard css attributes, such as font-weight:bold do not work.

 

The irritation du jour is regarding a webkit css, -webkit-transform: rotate(90deg);

This little gem works just fine when rendered as html but not pdf. Any suggestions?

 

 

 

 

Hey, check me out!

 

public string getOrdinal(integer i){
        string num = string.valueof(i);
        string suffix = 'th';
        string ordinal = '';
        i = integer.valueof(num.right(2));
        if(10 < i && i < 14) {
            ordinal =  num + suffix;
        }else{
            string onesDigit = num.right(1);
            if(onesDigit == '1'){
                suffix = 'st';
            }else if(onesDigit == '2'){
                suffix = 'nd';
            }else if(onesDigit == '3'){
                suffix = 'rd';
            }
            ordinal = num+suffix;
        }
        return ordinal;
    }

 :D

i am having issue with date field.

 

i have one field of type Date in my custom object. and i am storing the date value in it successfully.

 

here is my code:

 

public Date agendaDate2; // user name which will be provided by user   

public Date getAgendaDate2()   

{       

return agendaDate2;   

}   

public void setAgendaDate2(Date dateValue)   

{

       agendaDate2= dateValue;   

}

 

i am showing date value in <apex:inputText> my VF page

 

but it shows the "Fri Nov 18 00:00:00 GMT 2011" in this format.

 

i want to show this date in  12/11/2011 format.

 

show how can i do that ?

 

please help i am newbie in salesforce.

 

any kind of help will be greatly appriciated.

 

thanks in advance...

Vishal

 

 

If I have a Custom Controller and VisualForce page with a PageBlockTable and InlineEditSupport, what do I need to do to save the changes to multiple records in my PageBlockTable?

 

I tried 

public PageReference SaveTiers(){
        update tiers;
        setup(fields.id);
        return null;
    }

 where tiers is a list<tier__c> and setup() grabs the list of tier__c and fills tiers. THe thing is, I got this working at one point, but after a refresh it quit working and now I can't get it to work at all.

 

I would post all my code, but it would just confuse more because it is complicated and calls a lot of outside classes. Suffice to say, all I want to know is how would I write a function that saves the changes to a list of records that were changed via the inlineediting ui in a pageblocktable?

 

Is there a permissions issue with custom fields in a Developer Edition Site? I made a simple little visualforce page that displays the name standard field as well as a couple custom fields. It works fine in the org, but despite setting all the public permissions correctly, when I try to view the page on the site, the only field that is rendered is Name.

 

http://imfromthepast-developer-edition.na8.force.com/properties?id=a01C000000OeqM8

 

 

<apex:page Controller="Property" showHeader="false">
    <div style="margin:auto; width:1000px;">
        <div style="width:100%; float:left;">
            <div style="width:170px; float:left;">
                <apex:image value="{!URLFOR($Action.Attachment.Download, logo)}"/>
            </div>
            <div style="width:800px; height:100px; float:left; line-height:180px; text-align:right; font-size: 10pt">
                HOME | PHOTO GALLERY | FLOOR PLANS | AMENITIES | LOCATION | LEASING | RESIDENTS
            </div>
        </div>
        <div style="width:100%; float:left;">
            <div style="width:170px; height:362px; float:left; color:white; border: 0px solid #c0c0c0; padding:0px; text-align:left; background:#9c9b8d">
                <div style="border-bottom:2px solid white; padding:10px; font-size:15pt">View Community</div>
                <div style="border-bottom:1px dashed black; margin:5px; padding:5px 5px 5px 10px">HOME</div>
                <div style="border-bottom:1px dashed black; margin:5px; padding:5px 5px 5px 10px">PHOTO GALLERY</div>
                <div style="border-bottom:1px dashed black; margin:5px; padding:5px 5px 5px 10px">FLOOR PLANS</div>
                <div style="border-bottom:1px dashed black; margin:5px; padding:5px 5px 5px 10px">AMENITIES</div>
                <div style="border-bottom:1px dashed black; margin:5px; padding:5px 5px 5px 10px">LOCATION</div>
                <div style="border-bottom:1px dashed black; margin:5px; padding:5px 5px 5px 10px">LEASING</div>
                <div style="border-bottom:1px dashed black; margin:5px; padding:5px 5px 5px 10px">RESIDENTS</div>
            </div>
            <div style="width:780px; float:left; border: 1px solid #c0c0c0; margin-left:5px; padding:5px">
                <apex:repeat value="{!property.attachments}" var="a">
                    <apex:image value="{!URLFOR($Action.Attachment.Download, a.id)}"/>
                </apex:repeat> 
            </div>
            <div style="width:780px; height:100px; float:left; border: 1px solid #c0c0c0; margin-left:0px; padding:5px"> 
                {!property.overview__c}
            </div> 
            <div style="width:163px; height:100px; float:left; border: 1px solid #c0c0c0; margin-left:0px; padding:5px"> 
                <apex:outputtext value="{!property.name}"/><br/>
                <apex:outputtext value="{!property.street__c}"/>
            </div>          
        </div>
    </div>   
</apex:page>

 

public class Property {
    string id = apexpages.currentpage().getparameters().get('id');
    public property__c getProperty() {
        return [select name,street__c, city__c, features__c, state__c, zip__c, overview__c, phone__c, fax__c, (select id from attachments where name = 'Image.jpeg') from property__c where id = :id];
    }
    public string getLogo(){
        return [select id from Attachment where parentid = :id and name = 'logo.png'].id;
    }

}

 

 

 

When I use pageblocks and pageblocksections and outputfields, etc, I do not get the new Salesforce Look and Feel that I get when I view a standard SF page or when I use <apex:detail/>.

 

Why is that? Is there a way around that?

I am trying to draw a line on a VF page that I can adjust the thickness of.  I have tried the following:

 

<hr size="7" /> and <hr height="20">

 

But the line thickness seems to stay the same regardless of what values I use.   Any help would be appreciated.

Thank You.

Just trying out the new Spring 11 functionality, and had a question I am hoping someone might know..

 

I can get field sets to work as input or output fields.

 

I can get Inline editing to work as advertised.

 

But is it possible to output a set of fields from a field set and have those fields enabled to use inline editing? I have tried to combine the various examples but with no success - is it possible and if so, can someone give me an example?

 

For instance, it looks from the Spring Webinar that this should work if I pass in a Contact Id into the page...

 

 

<apex:page standardController="Contact" >
<apex:sectionHeader title="Inline for {!contact.Name}"/>
<apex:form>
 
<apex:pageMessages/>
<apex:pageBlock>
<apex:pageBlockButtons>
<apex:commandButton action="{!save}" value="Save"/>
</apex:pageBlockButtons>
<apex:pageBlockSection columns="2">
<apex:repeat value="{!$ObjectType.Contact.FieldSets.TestFS1}" var="f">
<apex:outputField value="{!Contact[f]}">
<apex:inlineEditSupport event="ondblclick"/>
</apex:outputField> 
</apex:repeat>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

 

 

 

Many thanks

In my page I have a component:

 

<c:AccountFooSection title="DISPLAYING ALL CURRENT FOOS FOR {!titleLink}" />

In my controller, I have this:

 

private String getTitleLink { 
    return '<br/><a style=\'white-space:nowrap\' href=\'/' + id + '\'>' + name + '</a>';
}

 This is what I see for the component's title: 

 

DISPLAYING ALL CURRENT FOOS FOR <br/><a style='white-space:nowrap' href='/001M0000002Kt7jIAC'>Foo Test</a>

 

I tried placing HTML tags in the title itself, but got the same result. There is no "escape='false'" for components.

 

Any suggestions? Thanks!

 

Note: This actually works fine on Winter '10 production, but not in my Spring '11 sandbox. Is Salesforce rendering differently now?

Am I doing something wrong or does the InLineEditSupport Tag not work with Field Sets?

I have been working on the Force.com for some time now and one thing that really helps me learn the platform is pushing the envelope and seeing where it tears. To this end I have decided to build a game on it.

Not anything fancy, like a first person shooter, just a turn based strategy game, like Risk.

Or more accurately, like Outreach.

Most of those old board games were little more than databases anyway, so I figured this would be an easy project. In fact the hardest part I anticipated was creating a hex map in CSS, but that turned out to be a two hour chore.

Ergo i anticipate smooth sailing from here on out. I am posting this here for anyone interested in following my progress as i take the Force.com platform that, to the best of my knowledge, it hasn't gone before, and also for anyone interested in helping me beta test the game when I am done.

 

Ciao.

How does one go about retrieving multiple jpgs that are attached to a given custom object, selecting one based on a filename saved in a related custom object, and displaying that jpg in visual force markup?

This is the use case:

I have a custom object for buildings. I have a custom object for floors, related to the building object through a master-detail relationship. I attach a jpeg of the floor plan to the floor record. I then want to grab the floors of a given building and display the floorplan jpg for each floor in that building.
I created a VF page. Here's the code:


Code:
<apex:page tabStyle="Account_c__c">
    <apex:pageblock title="Critical Accounts">
    <apex:enhancedList type="account_c__c" height="600" rowsPerPage="50" id="AccountList"></apex:enhancedList> 
    </apex:pageblock>
</apex:page>

 





This renders a page much like the typical enhanced list that one gets out of the box with salesforce. the only difference is it lacks the little print button on the upper right side of the enhanced list.

How do I get that print link back?

Message Edited by Jim Boudreaux on 10-30-2008 07:58 AM
I am making a VF page that looks exactly like the regular page except that the Related lists are tabbed.
The only thing missing is inline editing. Yes, it is activated and works fine in my non-VF pages.
Is there an attribute I'm missing?