Tip #717: Multi-line text on quick view forms

I will not use salesforce thumbnailQuick View forms are awesome, they are peekaboo utility for your records and can be used when summary information is required. There are some restrictions in place to make these forms fast and efficient.

One of the restrictions is that all formatting options for controls are taken away. As usually the case, baby was thrown out with the bathwater – it’s now impossible to set control to display multiple lines for, you know, multi-line text field. (And before you start pointing out that there are quick forms for cases and some other entities that display description fields on multiple lines: create a new quick form and try adding the description field to it. See? Those are system forms, created by CRM gods, after all).

David “CRM Baker” Crook to the rescue with some xml-twisting tip.

  1. Create new or edit an existing quick form.
  2. Add multi-line text field to the form as you normally would.
  3. Complete the form, publish.
  4. Create new solution, add the entity but select only that quick form (to keep xml shorter and things simpler).
  5. Export the solution as unmanaged.
  6. Extract customizations.xml from the zip file.
  7. Using your favorite xml editor, find the row and the cell elements that contain the control.
  8. Add rowspan attribute to the cell element.
  9. Add appropriate number of <row /> elements so that total number of rows is correct.
  10. If your <form> element has maxwidth attribute, ditch it.
  11. Save the file, add it to the solution zip file replacing the existing one.
  12. Import solution, publish.

Your XML should look like the following:

<rows>
  <row>
    <cell id="guid" showlabel="false" locklevel="0" 
          rowspan="4">
      <labels>
        <label description="Description" 
               languagecode="1033" />
       </labels>
       <control disabled="false" id="description" 
          classid="guid" uniqueid="guid" 
          datafieldname="description" />
    </cell>
  </row>
  <row />
  <row />
  <row />
</rows>

I believe that this gymnastic is unsupported but like that ever stopped us before, right? Supported, people, supported, what Tanguy said.

Tweet about this on TwitterShare on Facebook0Share on Google+0

8 thoughts on “Tip #717: Multi-line text on quick view forms

  1. Tanguy says:

    Actually this is supported as per the following MSDN article: https://msdn.microsoft.com/en-us/library/gg328486.aspx

  2. Fred says:

    Thanks for this! you can also add other xml elements such as:

    celllabelposition=”Top”

    In the section node which I normally use with multi line text fields because hte UI looks a bit strange with the label on the left.

    full node:

  3. Andrew Perkin says:

    In 2016 on-prem, there is one anomaly. Try it with more than one multi row text box and you hit formatting issues. The fields appear offset to each other.

    I sorted that by putting each field in its own section..

    There is one outstanding issue though. Despite there only being one column the fields only fill part of the horizontal space. Oddly hiding the label and widening to 250 does provide more space…

    Suspect this may need some extra XML and if I work it out will let you know.

    • Yvan Leclerc says:

      @Andrew

      I faced the same problem, e.g. the field only fills only part of the horizontal space (roughly 60%).

      How did you manage to widen to 250 pixels?

      Thanks!

    • Eric-Jan says:

      @ Andrew

      Did you allready worked out the XML and can you please share it? Within our project we are facing the same problem right now.

  4. Kevin Bowman says:

    I overcome this by adding extra rows to account for the extra ones allocated in Rowspan

    so in the example where rowspan=”4″, add 3 new empty rows

    ….

  5. Paul says:

    Even though our customer goes a little bit to far on that one, your article helped me a ton. Thanks and keep up the good work!

Leave a Reply

Your email address will not be published. Required fields are marked *