• RichardR1
  • NEWBIE
  • 130 Points
  • Member since 2019
  • Salesforce Admin trying to learn to code

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 36
    Questions
  • 24
    Replies
How do I go about controlling whether a pageblocksection is rendered or not based a clicking a button?
I want to invoke the save function when clicking outside or changing input of a Rich Text field. I tried using onclick and onchange in apex:inputField but it does not work.
I have a Visualforce page that autosaves based on time interval, using Javascript. I want to change it to autosave based on user input, meaning if user changes a field value or maybe if the user clicks on a different field. I have been trying to search for examples but I can't find any.
How do I go about dividing a record detail page into two or more pages but can still be accessed on the same record detail page? For example, if there are many fields in a detail page, instead of scrolling down to access more fields, you can click on a button that hides the 1st page and shows the 2nd page which shows the rest of the fields. There should also be an option to go back to first page.
Newbie dev here. Does anyone know why inline editing was disabled when I added the script below? The only reason I added it is because every time the page loads, the cursor moves to a specific field in the page, even though that was not last position of the cursor
 
<script>
    window.onload = function(){
        window.scrollTo(0,0);
    };
</script>

Not sure if you wanna see my Visualforce page since it's so long. I realize there is a similar question but it was not enough for me to resolve the issue.
Does anyone know why the cursor always lands on the same field whenever the page is loaded or reloaded? I have other Visualforce pages and other fields on the page but the cursor always lands on it.

User-added image
<apex:page standardController="Interview__c" sidebar="false" >
   <apex:form >
   <apex:pageBlock mode="maindetail" >
      
      <apex:pageBlockSection columns="3">
      
            <apex:pageBlockSectionItem dataStyle="background-color:#0E2D46"> <apex:outputText ></apex:outputText> </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem dataStyle="width:100%;text-align:center;background-color:#0E2D46;color:white;padding:7px">
                <apex:outputText > <b> Table Stakes </b></apex:outputText> </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem dataStyle="background-color:#0E2D46"> <apex:outputText ></apex:outputText> </apex:pageBlockSectionItem>
             
            <apex:pageBlockSectionItem dataStyle="vertical-align:middle;width:40%;text-align:center;background-color:#0E2D46;color:white">
                <apex:outputText > <b> Candidate's Search Status </b></apex:outputText> </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem dataStyle="width:40%;text-align:center">
                <apex:inputField value="{!Interview__c.Search_Status__c}"/> </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem dataStyle="width:20%;text-align:center">
                <apex:inputField value="{!Interview__c.StatusLogDate__c}" /> </apex:pageBlockSectionItem>

      </apex:pageBlockSection>

   </apex:pageBlock>
   <div align="center"> <apex:commandButton action="{!quicksave}" value="Save" /> </div>
   </apex:form>
</apex:page>

 
I want to send an email using classic email template that contains a link to a custom lightning component/page but I don't know how to pass the record Id from the URL in the email template. Is it possible? I only saw answers on how to pass Id from a button but not from a link.
Just like I can remove access to a particular object, how can I remove the user's access to Files or Attachments? Right now they can still access it if they use the global search function. I think there is no way to disable the global search function too. Any ideas?
Hi everyone, is it possible to single-click to edit a field in Visualforce? I want to do it while in detail mode/inline edit mode. So basically change the behavior of being able to edit just by single clicking the field, instead of double clicking?

Hello, I want to know if there's another way to allow user to input text that can be formatted using bold, underlined, italicize and bullets, without using Rich Text Area field, or maybe still use Rich Text Area field but make them smaller and hide the control bar? As you can see in the image, the Rich Text Area field looks too big compared to the other ones.

User-added image

Thanks

I am new to development and need help to pass test class code coverage for my controller extension. It is currently only at 63% coverage.

Controller Extension:
public class IVExtension {
public String sortOrder = 'Parameter__c ';
public Interview__c i { get; set; }
public List<Interview_Questions__c> getq(){
    List<Interview_Questions__c> results = Database.query(
        'SELECT Id, Parameter__c , ECA_Rating__c, Response_Notes__c, Question__c ' +
        'FROM Interview_Questions__c ' +
        'ORDER BY Parameter__c ASC '
    );
    return results; }

public ApexPages.StandardController sc;
public IVExtension(ApexPages.StandardController sc) {
    i = (Interview__c)sc.getRecord();
}

public PageReference saveRecord() {
update i.Interview_Questions__r;
return null;
}
}

Test Class:

@isTest
public class testIVExtension{

    testmethod static void testcondition0(){
        test.startTest();
        try{
              Interview__c i = new Interview__c (Job_Applicant__c = 'a0D3a00000NxusC');
              insert i;
              
            Interview_Questions__c q = new Interview_Questions__c(Interview_Parameter__c = 'a2Q3a000001QPcI',Interview__c = i.id,
            ECA_Rating__c = '1',Response_Notes__c = 'test',Question__c = 'test');
            insert q;
              
         ApexPages.StandardController sc = new ApexPages.standardController(i);
            IVExtension IE = new IVExtension(sc);
            IE.saveRecord();
        } catch (Exception e)
        {
            system.assert(e!=null);
        }
        test.stopTest();
    }
    testmethod static void testcondition1(){
        test.startTest();
        try{
          List<Interview_Questions__c> results = Database.query(
        'SELECT Id, Parameter__c , ECA_Rating__c, Response_Notes__c, Question__c ' +
        'FROM Interview_Questions__c ' +
        'ORDER BY Parameter__c ASC '
    );
        } catch (Exception e)
        {
            system.assert(e!=null);
        }
        test.stopTest();
    }
}
You can probably tell by now that I only understand half of what I'm doing...

So I have a VF page to show an inline editable related list of another object. The problem is since I used apex:repeat, it sorts by createdDate instead of a certain field that I want it to sort, which is the standard Name field. I have just started self studying Apex development and no prior coding exp.

Below is the extension:

public class IVExtension {
public Interview__c i { get; set; }
public List<Interview_Questions__c> q=new List<Interview_Questions__c>([SELECT Parameter__c,id FROM Interview_Questions__c
WHERE Interview_Questions__c.Interview__c =:i.id  ORDER BY Parameter__c DESC ]);


public ApexPages.StandardController sc;
public IVExtension(ApexPages.StandardController sc) {
    i = (Interview__c)sc.getRecord();
    q = [SELECT Parameter__c,id FROM Interview_Questions__c WHERE Interview_Questions__c.Interview__c =:i.id  ORDER BY Parameter__c DESC ];
}

public PageReference saveRecord() {
update i.Interview_Questions__r;
update i;
return null;
}
}


Here is my VF page:

<apex:page standardController="Interview__c"  sidebar="false" >
   <apex:form >
      <div align="center"> <apex:commandButton action="{!quicksave}" value="Save" /> </div>
   <apex:pageBlock mode="maindetail" >
    
                <apex:pageBlockSection columns="4">
        <apex:pageBlockSectionItem dataStyle="width:25%;text-align:center;background-color:#0E2D46;color:white;padding:7px">
            <apex:outputText > <b> Parameter </b></apex:outputText> </apex:pageBlockSectionItem>
       <apex:pageBlockSectionItem dataStyle="width:10%;text-align:center;background-color:#0E2D46;color:white;padding:7px" > <apex:outputText > <b>Question</b> </apex:outputText>
            </apex:pageBlockSectionItem> 
       <apex:pageBlockSectionItem dataStyle="width:35%;text-align:center;background-color:#0E2D46;color:white;padding:7px" > <apex:outputText > <b>ECA Rating</b> </apex:outputText>
            </apex:pageBlockSectionItem>
       <apex:pageBlockSectionItem dataStyle="text-align:center;background-color:#0E2D46;color:white;padding:7px">
            <apex:outputText > <b>Response / Notes</b> </apex:outputText>
       </apex:pageBlockSectionItem>
       
                <apex:repeat value="{!Interview__c.Interview_Questions__r}" var="ques" >
                       <apex:pageBlockSectionItem dataStyle="width:10%;padding:7px;background-color:#0E2D46;color:white">
                               <apex:inputField value="{!ques.Parameter__c}"/> </apex:pageBlockSectionItem>
                       <apex:pageBlockSectionItem dataStyle="width:30%;padding:7px;background-color:#0E2D46;color:white">
                               <apex:outputField value="{!ques.Question__c}" style=""/></apex:pageBlockSectionItem>
                       <apex:pageBlockSectionItem dataStyle="width:5%;padding:7px">
                               <apex:inputField value="{!ques.ECA_Rating__c}"/> </apex:pageBlockSectionItem>
                       <apex:pageBlockSectionItem dataStyle="width:55%;padding:7px">
                               <apex:inputField value="{!ques.Response_Notes__c}"/> </apex:pageBlockSectionItem>
                </apex:repeat>
                </apex:pageBlockSection>
   </apex:pageBlock>
   <div align="center"> <apex:commandButton action="{!quicksave}" value="Save" /> </div>
   </apex:form>
</apex:page>


Thanks,

Richard

Hi all, what's the best way to implement something like this table below (made using PPT). It has to be inline editable and formattable exactly like in the image. The column headers don't need to stay merged.
User-added image
What's the simplest way in Visualforce to show a related list that is sorted by a certain field? It should also be inline-editing enabled. Please post sample Visualforce and controller extension/ controller codes.
Is it possible to do this without a controller extension? I'm not very good at test class and it's difficult for me to deploy any apex classes to production because I'm not really a developer yet. Is it possible to do a redirect using only Visualforce development?
I tried using Workbench and Salesforce Event Log File Browser to view and audit report exporting history but I can't see the number of rows processed in the results. I think it's possible but I don't know how to do this next step pointed by the red arrow in the attached imageUser-added image
Hi all, I am trying to learn development while building Apex classes. I got this error upon trying to deploy a custom controller and test class from sandbox to production:
"System.NullPointerException: Attempt to de-reference a null object"

Here is my controller:
public class MyController {

public final Contact c;
ApexPages.StandardController sc;
MyController m;
public MyController(ApexPages.StandardController sc) {
    this.c = (Contact)sc.getRecord();
}

public void quicksave() {
    Job_Applicant__c j = (Job_Applicant__c) sc.getRecord();
    update j.Contact_Candidate__r;
}
}

Here is my test class for the controller:
@isTest
public class testMyController{
public static testMethod void testMyController() {

    Contact c = new Contact(LastName = 'testmycontroller');
    insert c;
    
    Job_Applicant__c j = new Job_Applicant__c(Contact_Candidate__c = c.id);
    insert j;
    
        ApexPages.StandardController sc = new ApexPages.standardController(c);
    MyController m = new MyController(sc);
    System.assertEquals(m.c, c);
    
    Test.startTest();
    m.quicksave();
    test.stopTest();
}
}

Thanks
Hello, I am just learning development but I need to be able to use my custom controller I created for use in a visualforce page in production. I can't get past code coverage failure when I try to deploy. Not sure if there's something wrong with my custom controller. I tried all the existing test classes available in production. Below is the code for my controller:
public class MyController {

public ApexPages.StandardController sc;

public MyController(ApexPages.StandardController sc) {
    this.sc = sc;
}

public void quicksave() {
    AVTRRT__Job_Applicant__c j = (AVTRRT__Job_Applicant__c) sc.getRecord();
    update j.AVTRRT__Contact_Candidate__r;
}
}

 

Hello, I am new and teaching myself Visualforce development and I need help. I created a visualforce page to be placed on a child custom object record detail page.

All I want to do is allow my users to be able to edit some fields from the parent object (Contact) while they are on the child object (Job Applicant) record page. I was able to show the fields in the visualforce page, however, when I test it by make editing the field values and clicking Save, the changes do not save at all. I need to accomplish this in Classic interface.

<apex:page standardController="Job_Applicant__c" sidebar="false" >
   <apex:form >
   <apex:inlineEditSupport />
   <apex:pageBlock mode="maindetail" >
   <apex:pageBlockSection  >
           
         <apex:pageBlockSectionItem> <apex:outputField value="{!Job_Applicant__c.Contact_r.Handle_with_care__c}" /> </apex:pageBlockSectionItem>
         <apex:pageBlockSectionItem > <apex:outputField value="{!Job_Applicant__c.Contact_r.Geographic_Preferences_Notes__c}"/> </apex:pageBlockSectionItem>

   </apex:pageBlockSection>
 <apex:commandButton action="{!quicksave}" value="Save" />
   </apex:pageBlock>
   </apex:form>
</apex:page>
In Lightning, when you create a new Contact record, the page pops up a floating window. How do I go about changing from a floating window to a full webpage when creating a new record, like how it does in Classic?
How do I go about dividing a record detail page into two or more pages but can still be accessed on the same record detail page? For example, if there are many fields in a detail page, instead of scrolling down to access more fields, you can click on a button that hides the 1st page and shows the 2nd page which shows the rest of the fields. There should also be an option to go back to first page.
Newbie dev here. Does anyone know why inline editing was disabled when I added the script below? The only reason I added it is because every time the page loads, the cursor moves to a specific field in the page, even though that was not last position of the cursor
 
<script>
    window.onload = function(){
        window.scrollTo(0,0);
    };
</script>

Not sure if you wanna see my Visualforce page since it's so long. I realize there is a similar question but it was not enough for me to resolve the issue.
I am trying to access a managed package vf page from Salesforce order(This is working fine), But I am getting an error message when I are accessing it from Communities. Any inputs on this??
I have checked all the vf page permission on community profile and all the setting are good, not sure why this is happening, Once I click on the page it is being redirect to a new page and showing the error as per the screenshot...Any inputs on this??User-added image
What's the simplest way in Visualforce to show a related list that is sorted by a certain field? It should also be inline-editing enabled. Please post sample Visualforce and controller extension/ controller codes.
Hi all, I am trying to learn development while building Apex classes. I got this error upon trying to deploy a custom controller and test class from sandbox to production:
"System.NullPointerException: Attempt to de-reference a null object"

Here is my controller:
public class MyController {

public final Contact c;
ApexPages.StandardController sc;
MyController m;
public MyController(ApexPages.StandardController sc) {
    this.c = (Contact)sc.getRecord();
}

public void quicksave() {
    Job_Applicant__c j = (Job_Applicant__c) sc.getRecord();
    update j.Contact_Candidate__r;
}
}

Here is my test class for the controller:
@isTest
public class testMyController{
public static testMethod void testMyController() {

    Contact c = new Contact(LastName = 'testmycontroller');
    insert c;
    
    Job_Applicant__c j = new Job_Applicant__c(Contact_Candidate__c = c.id);
    insert j;
    
        ApexPages.StandardController sc = new ApexPages.standardController(c);
    MyController m = new MyController(sc);
    System.assertEquals(m.c, c);
    
    Test.startTest();
    m.quicksave();
    test.stopTest();
}
}

Thanks
Hello, I am just learning development but I need to be able to use my custom controller I created for use in a visualforce page in production. I can't get past code coverage failure when I try to deploy. Not sure if there's something wrong with my custom controller. I tried all the existing test classes available in production. Below is the code for my controller:
public class MyController {

public ApexPages.StandardController sc;

public MyController(ApexPages.StandardController sc) {
    this.sc = sc;
}

public void quicksave() {
    AVTRRT__Job_Applicant__c j = (AVTRRT__Job_Applicant__c) sc.getRecord();
    update j.AVTRRT__Contact_Candidate__r;
}
}

 

Hello, I am new and teaching myself Visualforce development and I need help. I created a visualforce page to be placed on a child custom object record detail page.

All I want to do is allow my users to be able to edit some fields from the parent object (Contact) while they are on the child object (Job Applicant) record page. I was able to show the fields in the visualforce page, however, when I test it by make editing the field values and clicking Save, the changes do not save at all. I need to accomplish this in Classic interface.

<apex:page standardController="Job_Applicant__c" sidebar="false" >
   <apex:form >
   <apex:inlineEditSupport />
   <apex:pageBlock mode="maindetail" >
   <apex:pageBlockSection  >
           
         <apex:pageBlockSectionItem> <apex:outputField value="{!Job_Applicant__c.Contact_r.Handle_with_care__c}" /> </apex:pageBlockSectionItem>
         <apex:pageBlockSectionItem > <apex:outputField value="{!Job_Applicant__c.Contact_r.Geographic_Preferences_Notes__c}"/> </apex:pageBlockSectionItem>

   </apex:pageBlockSection>
 <apex:commandButton action="{!quicksave}" value="Save" />
   </apex:pageBlock>
   </apex:form>
</apex:page>
Hello. Does anyone know how to read the REPORT_DESCRIPTION from workbench?

I'm just looking to see if I can find any information about the row count of the report that was exported.

I downloaded some logs for ReportExport, not so much details on there except for the REPORT_DESCRIPTION column. See actual content below:
 
?last_modified_user_id=005j000000DTznr&irpe19=true&irpe18=true&irpe17=true&irpe16=true&irpe15=true&irpe14=true&_CONFIRMATIONTOKEN=VmpFPSxNakF5TUMwd09DMHhNRlF5TVRvME5qbzFNeTQxTkRWYSxEdlZpb0RCZV93NzZyNVdmcjlmZURTLFltVmxOakV4&cfsize=12&irpe13=true&tfg=0&irpe23=true&irpe22=true&irpe21=true&irpe20=true&rt=2&save_drill=0&Yman=no&cc10=false&currency=000&co=1&l=1&cp=b&cs=default&ct=none&v=142&ctsize=18&last_modified_date=7%2F15%2F2020+5%3A17+PM&bg2=16777215&bg1=16777215&cc22=false&cc23=false&colDt_c=CREATED_DATE&details=yes&pc0=00Nf100000Bnlin&export=Export&pc2=00N3a00000Ctr8r&pc1=00Nj0000003m1b9&pc3=00Nj000000AGKXy&cc19=false&colDt_q=custom&cc17=false&cc18=false&cc15=false&cc16=false&cc13=false&cc14=false&cc11=false&cc12=false&cc20=false&cc21=false&fg=0&scope=organization&irpe12=true&irpe11=true&irpe10=true&enc=ISO-8859-1&irpe7=true&irpe6=true&irpe9=true&irpe8=true&irpe3=false&irpe2=false&pv1=Connected%2CScheduled%2CMet+With+-+Intro+Meeting%2CMet+With+-+Follow-up+Meeting%2CClient%2CFormer+Client&irpe5=true&pv0=Peterson+Loftin&irpe4=true&pv3=6%2F8%2F2020&pv2=True&xf=localecsv&irpe1=false&irpe0=false&id=00O3a0000054WD8&cr_lowcolor0=12735572&cr_lowcolor2=12735572&cr_lowcolor1=12735572&csize=3&c_13=FIRST_NAME&cust_owner=005j000000DTznr&c_14=LAST_NAME&c_11=00Nj0000003I1rm&c_12=00Nj000000CMtyp&c_1=00Nf100000BnN4F&c_0=00Nf100000BnN4A&c_10=00Nj000000BdfLk&c_3=00Nf100000Ckeyk&show_grandtotal=true&c_2=00Nj000000BeTpB&c_5=00N3a00000Ctop4&c_4=00N3a00000CtouY&c_7=00Nf100000CIWvA&c_6=00N3a00000CtopE&c_9=00Nf100000CCSvd&chsa=mbars&c_8=00Nf100000CCSvY&cnt=52&sortdir=up&chda=no&c_28=00Nf100000CI1fd&c_29=00Nj000000CMInQ&c_26=00Nj0000003OdCU&duel0=00Nf100000BnN4A%2C00Nf100000BnN4F%2C00Nj000000BeTpB%2C00Nf100000Ckeyk%2C00N3a00000CtouY%2C00N3a00000Ctop4%2C00N3a00000CtopE%2C00Nf100000CIWvA%2C00Nf100000CCSvY%2C00Nf100000CCSvd%2C00Nj000000BdfLk%2C00Nj0000003I1rm%2C00Nj000000CMtyp%2CFIRST_NAME%2CLAST_NAME%2C00Nj000000Ap9SQ%2CACCOUNT.NAME%2C00Nj0000003RVJa%2C00Nj000000BfRv1%2C00Nf100000BnJav%2C00Nj0000003LJTd%2C00Nf100000CO0P1%2C00Nf100000Bnlin%2C00Nj0000003m1b9%2CCONTACT_ID%2C00Nj000000AGKXy%2C00Nj0000003OdCU%2C00Nj0000006fJGJ%2C00Nf100000CI1fd%2C00Nj000000CMInQ%2C00Nj0000008u4wB%2C00Nj0000008u4vS%2C00Nj000000CMtyk%2C00Nj000000CMtz4%2C00Nj000000CMtyu%2C00N3a00000Ctumk%2C00Nj000000CMtyG%2C00Nf100000CNA9y%2C00Nf100000CN3us%2CEMAIL%2C00Nj0000003OMa3%2C00Nj0000003OMV3%2C00Nf100000Bncp1%2C00Nj0000003BwGG%2C00Nj0000008lWc1%2C00Nj0000003sZif%2C00Nj00000097oRN%2C00Nj0000008txcC%2C00Nj0000008u51p%2C00Nj0000008voJC%2C00Nj0000003IIdG%2C00N3a00000CqNL1&topn=all&c_27=00Nj0000006fJGJ&c_35=00N3a00000Ctumk&c_36=00Nj000000CMtyG&c_33=00Nj000000CMtz4&chum=no&c_34=00Nj000000CMtyu&c_31=00Nj0000008u4vS&c_32=00Nj000000CMtyk&c_30=00Nj0000008u4wB&chsv=no&chst=no&format=tt&c_19=00Nf100000BnJav&sort=00Nf100000CO0P1&chsp=no&show_subtotals=true&c_17=00Nj0000003RVJa&c_18=00Nj000000BfRv1&c_15=00Nj000000Ap9SQ&c_16=ACCOUNT.NAME&c_24=CONTACT_ID&c_25=00Nj000000AGKXy&c_22=00Nf100000Bnlin&c_23=00Nj0000003m1b9&c_20=00Nj0000003LJTd&c_21=00Nf100000CO0P1&bgdir=2&chco=no&lsk=1&cr_highcolor1=5554772&cr_highcolor2=5554772&c_48=00Nj0000008u51p&sideBySide=false&c_49=00Nj0000008voJC&cc1=false&cc0=false&cc3=false&cc2=false&cc5=false&cc4=false&cc7=false&c_51=00N3a00000CqNL1&cc6=false&cc9=false&cc8=false&c_50=00Nj0000003IIdG&cust_name=Marj+-+Tracker&cr_midcolor0=12763732&cr_midcolor1=12763732&sal=yes&cr_midcolor2=12763732&cust_devName=Marj_Tracker&cheh=no&last_modified_by=Prince+Garcia&c_39=EMAIL&c_37=00Nf100000CNA9y&c_38=00Nf100000CN3us&c_46=00Nj00000097oRN&c_47=00Nj0000008txcC&pn1=ne&c_44=00Nj0000008lWc1&cr_highcolor0=5554772&pn0=eq&c_45=00Nj0000003sZif&pn3=le&c_42=00Nf100000Bncp1&pn2=eq&c_43=00Nj0000003BwGG&c_40=00Nj0000003OMa3&c_41=00Nj0000003OMV3
I made a tab for my visualforce page just so I can get it's URL and reference it in a hyperlink in a formula field. Unfortunately since it is a tab, the page moves away from the originating page to the VF tab. How can I reference only the VF page instead of the tab?

I'm very new to development. We have a trigger that I think is bulkified but still I am getting errors whenever I mass update more than 200 contacts using Data Import Wizard.

What I don't understand is why only the first 200 contacts fail and then all other contacts in excess are updated successfully, even though they are on the same CSV upload. Does anyone know why this is the case?

Without using Einstein Analytics, what would it take to be able to link a dashboard which automatically selects a filter based on the link that I sent the user, so the user won't have to select the filters? This would be useful in our case where a dashboard have as many as 50 filters at a time.
Hope you're all in good health. Can anyone help how to reduce the width of the first column in my pageBlockSection VF page? There's just too much space for checkbox fields.
<apex:page standardController="Contact" sidebar="false" >
   <apex:form >
   <apex:inlineEditSupport />
   <apex:pageBlock mode="maindetail" >
   <apex:pageBlockSection columns="4" >

         <apex:pageBlockSectionItem > <apex:outputText > <b> Hard Pref </b> </apex:outputText> </apex:pageBlockSectionItem>
         <apex:pageBlockSectionItem > <apex:outputText > <b>Category</b> </apex:outputText> </apex:pageBlockSectionItem>
         <apex:pageBlockSectionItem > <apex:outputText > <b>Preferences</b> </apex:outputText> </apex:pageBlockSectionItem>
         <apex:pageBlockSectionItem >  <apex:outputText > <b>Notes</b> &nbsp; &nbsp;&nbsp;</apex:outputText> </apex:pageBlockSectionItem>
           
        
         <apex:pageBlockSectionItem > <apex:outputField value="{!Contact.Handle_with_care__c}" /> </apex:pageBlockSectionItem>
         <apex:pageBlockSectionItem > <apex:outputText > Geography </apex:outputText> </apex:pageBlockSectionItem>
         <apex:pageBlockSectionItem > <apex:outputField value="{!Contact.Geographic_HWC__c}" /> </apex:pageBlockSectionItem>
         <apex:pageBlockSectionItem > <apex:outputField value="{!Contact.Geographic_Preferences_Notes__c}" /> </apex:pageBlockSectionItem>
         
      
         <apex:pageBlockSectionItem > <apex:outputField value="{!Contact.Handle_with_care__c}" /> </apex:pageBlockSectionItem>
         <apex:pageBlockSectionItem > <apex:outputText > Travel </apex:outputText> </apex:pageBlockSectionItem>
         <apex:pageBlockSectionItem > <apex:outputField value="{!Contact.Travel_HWC__c}" /> </apex:pageBlockSectionItem>
         <apex:pageBlockSectionItem > <apex:outputField value="{!Contact.HwC_Preferences_Notes__c}" /> </apex:pageBlockSectionItem>

   </apex:pageBlockSection>
      <div align="center"> <apex:commandButton action="{!quicksave}" value="Save" /> </div>
   </apex:pageBlock>
   </apex:form>
</apex:page>

pageBlockSection
I want to put borders on every row but it seems that my rows are not being detected as rows, and that's why I don't see borders where I want them to be, which is between the rows...
 
<apex:dataTable value="{!Contact}" var="a" align="center" border="4" cellspacing="3" cellpadding="4" rules="all">
   
       <apex:column headerValue="Hard preference?" width="50px" >
        <apex:outputField value="{!a.Handle_with_care__c}" /> <br></br>
        <apex:outputField value="{!a.Handle_with_care__c}"/>
       </apex:column>

       <apex:column headerValue="Preference Category" width="400px" >
        <apex:outputField value="{!a.Handle_with_care_description__c}" /> <br></br>
        <apex:outputText > Travel </apex:outputText>
       </apex:column>

       <apex:column headerValue="Preferences" width="300px" >
        <apex:outputField value="{!a.Geographic_HWC__c}" /> <br></br>
        <apex:outputField value="{!a.Travel_HWC__c}" />
       </apex:column>
      
       <apex:column headerValue="Additional Notes" width="300px" >
        <apex:outputField value="{!a.Geographic_Preferences_Notes__c}" /> <br></br>
        <apex:outputField value="{!a.HwC_Preferences_Notes__c}" />
       </apex:column>
      
       <apex:inlineEditSupport />
</apex:dataTable>

 
I am attempting to use a DataTable to show individual field values as "cell" values in a spreadsheet on my VisualForce page. I'm doing this by stacking the fields upon one another. This is the actual syntax I am using : 

 
<apex:pageblocksection title="Risk Assessment" showheader="true" collapsible="true" columns="1">
<apex:dataTable value="{!Vendor_Product_Review__c}" var="pitem" border="4"  align="center" cellpadding="8" > 
                             <apex:column headerValue="">
                             <apex:outputLabel >Credit   </apex:outputLabel><br></br>
                             <apex:outputLabel >Liquidity   </apex:outputLabel><br></br>
                             <apex:outputLabel >Transaction   </apex:outputLabel><br></br>
                             <apex:outputLabel >Foreign Exchange   </apex:outputLabel>
                             </apex:column>
                         
                             <apex:column headerValue="P">
                                 <apex:inputfield value="{!pitem.CreditRiskProbability__c}"/><br></br>
                                 <apex:inputfield value="{!pitem.LiquidityRiskProbability__c}"/><br></br>
                                 <apex:inputfield value="{!pitem.TransactionRiskProbability__c}"/><br></br>
                                 <apex:inputfield value="{!pitem.ForeignExchangeRiskProbability__c}"/><br></br>
                             </apex:column>
                         
                             <apex:column headerValue="S">   
                                <apex:inputfield value="{!pitem.CreditRiskSeverity__c}"/><br></br>
                                <apex:inputfield value="{!pitem.LiquidityRiskSeverity__c}"/><br></br>
                                <apex:inputfield value="{!pitem.TransactionRiskSeverity__c}"/><br></br>
                                <apex:inputfield value="{!pitem.ForeignExchangeRiskSeverity__c}"/><br></br>
                             </apex:column>
                         
                             <apex:column headerValue="C">
                              <apex:inputfield value="{!pitem.CreditControlAdequacy__c}"/><br></br>   
                              <apex:inputfield value="{!pitem.LiquidityControlAdequacy__c}"/><br></br>      
                              <apex:inputfield value="{!pitem.TransactionControlAdequacy__c}"/><br></br>      
                              <apex:inputfield value="{!pitem.ForeignExchangeControlAdequacy__c}"/><br></br>                           
                             </apex:column>
</apex:dataTable>
</apex:pageblocksection>


Is there a way for me to have the horizontal grid lines appear between each individual InputField in order to make them appear to be in their own "cell" ?

Thank you for your input.

 

  • November 13, 2015
  • Like
  • 0
I'm trying to setup a workflow rule that writes the values of custom fields created directly in my organization to fields that exist on a visualforce page in a managed package. The workflow rule criteria is set to "created and everytime the record is edited."

The workflow rule works as expected when on a standard page; but the workflow rule isn't triggered when I edit fields on the visualforce page.

Is there a limitation preventing workflow rules from triggering when a visualforce page is being used for both the edit and detail views of the record? If so, is there a work around? I would prefer not to use an apex trigger for this particular task.

Thank you for your help.