• pihaf4 40229
  • NEWBIE
  • 0 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 5
    Replies

Hi All,
I'm looking for some help on column widths. I have a visualforce page in a record, as I would like to see 4 rows at once. 1 label and 3 fields. I would like the column widths to all be the same, but its all over the place. The first two columns are very large, and the last two squished at the end. Any help would be appreciated. 

User-added image

<apex:page standardController="ROI_Calculator__c">
         
  <apex:pageBlock title="Cost Savings Estimates">

<apex:pageBlockSection columns="4" showHeader="true" title="Cost Savings Estimates: Monthly & Per Cubic Yard/Metre Returns"> 

Cementitious content reduction (%)
  <apex:outputField label="" value="{!ROI_Calculator__c.Reduct1__c}" style="width:25%"/>
  <apex:outputField label="" value="{!ROI_Calculator__c.Reduct2__c}" style="width:25%"/>
  <apex:outputField label="" value="{!ROI_Calculator__c.Reduct3__c}" style="width:25%"/>
Cementitious content reduction (lbs/kg)
  <apex:outputField label="" value="{!ROI_Calculator__c.Cementitious_content_reduct_weight_1__c}" style="width:25%"/>
  <apex:outputField label="" value="{!ROI_Calculator__c.Cementitious_content_reduct_weight_2__c}" style="width:25%"/>
  <apex:outputField label="" value="{!ROI_Calculator__c.Cementitious_content_reduct_weight_3__c}" style="width:25%"/>
Break-even Production (yds/m3 - months)
  <apex:outputField label="" value="{!ROI_Calculator__c.Break_even_Production_yds_months_1__c}" style="width:25%"/>
  <apex:outputField label="" value="{!ROI_Calculator__c.Break_even_Production_Len_months_2__c}" style="width:25%"/>
  <apex:outputField label="" value="{!ROI_Calculator__c.Break_even_Production_Len_months_3__c}" style="width:25%"/>
</apex:pageBlockSection>
      
      
 <apex:pageBlockSection columns="4" showHeader="true" title="Return On Investment Monthly"> 
Production Savings / Month 
  <apex:outputField label="" value="{!ROI_Calculator__c.Production_Savings_Month_1__c}" style="width:25%"/>
  <apex:outputField label="" value="{!ROI_Calculator__c.Production_Savings_Month_2__c}" style="width:25%"/>
  <apex:outputField label="" value="{!ROI_Calculator__c.Production_Savings_Month_3__c}" style="width:25%"/>
Value Added Services
  <apex:outputField label="" value="{!ROI_Calculator__c.ValueAdded_1__c}" style="width:25%"/>
  <apex:outputField label="" value="{!ROI_Calculator__c.ValueAdded_2__c}" style="width:25%"/>
  <apex:outputField label="" value="{!ROI_Calculator__c.ValueAdded_3__c}" style="width:25%"/>
Technology Expenses / Month
  <apex:outputField label="" value="{!ROI_Calculator__c.Technology_Expenses_Month_1__c}" style="width:25%"/>
  <apex:outputField label="" value="{!ROI_Calculator__c.Technology_Expenses_Month_2__c}" style="width:25%"/>
  <apex:outputField label="" value="{!ROI_Calculator__c.Technology_Expenses_Month_3__c}" style="width:25%"/>
Net Saving (Loss) / Month
  <apex:outputField label="" value="{!ROI_Calculator__c.Net_Saving_Loss_Month_1__c}" style="width:25%"/>
  <apex:outputField label="" value="{!ROI_Calculator__c.Net_Saving_Loss_Month_2__c}" style="width:25%"/>
  <apex:outputField label="" value="{!ROI_Calculator__c.Net_Saving_Loss_Month_3__c}" style="width:25%"/>
</apex:pageBlockSection>
      
 <apex:pageBlockSection columns="4" showHeader="true" title="Return On Investment / Yard/Metre"> 
Production Savings - Yard/Metre 
  <apex:outputField label="" value="{!ROI_Calculator__c.SavingsReduct1__c}" style="width:25%"/>
  <apex:outputField label="" value="{!ROI_Calculator__c.SavingsReduct2__c}" style="width:25%"/>
  <apex:outputField label="" value="{!ROI_Calculator__c.SavingsReduct3__c}" style="width:25%"/>
Technology Expenses - Yard/Metre
  <apex:outputField label="" value="{!ROI_Calculator__c.Technology_Expenses_Yard_1__c}" style="width:25%"/>
  <apex:outputField label="" value="{!ROI_Calculator__c.Technology_Expenses_Length_2__c}" style="width:25%"/>
  <apex:outputField label="" value="{!ROI_Calculator__c.Technology_Expenses_Length_3__c}" style="width:25%"/>
Net Saving (Loss) - Yard/Metre
  <apex:outputField label="" value="{!ROI_Calculator__c.Net_Saving_Loss_Yard_1__c}" style="width:25%"/>
  <apex:outputField label="" value="{!ROI_Calculator__c.Net_Saving_Loss_Length_2__c}" style="width:25%"/>
  <apex:outputField label="" value="{!ROI_Calculator__c.Net_Saving_Loss_Length_3__c}" style="width:25%"/>
</apex:pageBlockSection>      
</apex:page>
 


 

I am getting this kind of error for the second time after using a new playground and done all the challenge 2 again and about to finish the challenge 3 ( It's a wast of time). I would appreciate if I can get any help to sort this out. Thanks.  Here is the error message: 

" Challenge Not yet complete... here's what's wrong:
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: DKCKNRLJ
As much as I put the header as blue
User-added image

When the web page load, the header show black, why?
User-added image

in this documentation https://help.salesforce.com/s/articleView?id=sf.snapins_chat_branding.htm&type=5 (https://help.salesforce.com/s/articleView?id=sf.snapins_chat_branding.htm&type=5) don't say anything about this... before talk with bot this header black is default?
Hi experts!
I have a little problem with a simple force.com site that I'm building.
I want to see a list of contacts with basic info, one of these info is a picklist field, but when I render the page, this picklist show the first value of list instead of the current value of the record.
Here's my VF Code of the picklist:
VF
<apex:pageBlockSectionItem >
                                    <apex:outputLabel value="{!$ObjectType.Contact.fields.type__c.label}" />
                                    <apex:selectList styleClass="slds-input"  value="{!statusOptions}"   size="1">
                                        <apex:selectOptions value="{!ItemsList}" rendered="true"/>
                                    </apex:selectList>
                                </apex:pageBlockSectionItem>
And the method of the controller:

public List<Selectoption> getItemsList(){
        List<SelectOption> options = new List<SelectOption>(); 
        List<Schema.Picklistentry> fieldResult = Schema.Contact.type__c.getDescribe().getPicklistValues();
        //options.add(new SelectOption());
        for(Schema.PicklistEntry f : fieldResult) {
            options.add(new SelectOption(f.getValue(), f.getLabel()));
        }
        return options;
    }

Any help will be very appreciated! Thanks in advance.