awjudge
Hot Shot
Hot Shot

Making the 'Description' field of a blueprint mandatory

Is it possible to make the 'Description' field of a blueprint request mandatory?

We've configured our workflows such that the content of that field populates not just the Annotations in vCenter, but also the Description in Active Directory.

Tags (1)
12 Replies
JakeP
Enthusiast
Enthusiast

Did you ever figure out how to do this?

It looks like the custom property VirtualMachine.Admin.Description might be the correct property, but it creates a separate 'server description' field in the blueprint form.

Thanks,

Jake

0 Kudos
JamesMW
Enthusiast
Enthusiast

The easiest way would be to create a required custom property. You then control the name of the property, what blueprints it's visible to etc....

But, if that's not what you want to do, you can modify the underlying ASPX to make the field required.

- Navigate to D:\Program Files (x86)\VMware\vCAC\Server\Website\Leases.

- Open ConfirmNewRequest.aspx.

- Search for 'id="trDescription"'

All that needs to be done, is add some tags to the label, and to the text box to make it required. I cannot say for certain if this is true for all versions, but in my vCAC 6.1 lab this is what the section should look like:

<tr id="trDescription" runat="server">

     <td class="Label">

           <vmps:Literal runat="server" IsLabel="true" Text="<%$Resources:Labels,Description%>" IsRequired="true" />

    </td>

    <td class="Field">

     <dxe:ASPxMemo ID="txtNotes" MaxLength="256" runat="server" IsRequired="true" >

               <ValidationSettings RequiredField-IsRequired="true" RequiredField-ErrorText="<%$Resources:Messages,RequiredField%>" SetFocusOnError="true"/>

          </dxe:ASPxMemo>

     </td>

</tr>

The first bolded item makes the label have the red asterisk. The second set of text makes the form validate the description field.

Beware, upgrades will overwrite any customization made to these files, so make sure you back it up...

-James

Message was edited by: JamesMW

0 Kudos
vmwaredownload
Enthusiast
Enthusiast

Hi,

On the same note, is it possible to hide the "Reason for Request" field while requesting a blueprint?

And is there any way to change to Memory size which is in "MB" to "GB" while requesting a blueprint?

-SK

0 Kudos
JamesMW
Enthusiast
Enthusiast

You can hide any field by adding style="display:none" to the table row.


<tr id="trDescription" runat="server" style="display:none">


Be careful tho, if you hide a required field, the field will still be required but the user won't be able to see it, and then wont be able to submit the form.




For the memory, that would be a little more challenging, you would have to add a label to change it to 'Memory (GB)'. But, vCAC will still display the memory in MB, and set the VM to MB's, so I'm not sure how you would achive that.

JamesMW
Enthusiast
Enthusiast

The request row would look like this:

<tr id="trRequestRow" runat="server" style="display:none">

0 Kudos
JakeP
Enthusiast
Enthusiast

Thanks James. My preference would be to use a custom property, but to the best of my knowledge it would leave the unnecessary and redundant default description field in place on the form. Is there a way to get around that using a custom property?

0 Kudos
vmwaredownload
Enthusiast
Enthusiast

Thanks JamesMW for the information. Will look at it!

0 Kudos
JamesMW
Enthusiast
Enthusiast

Yep, if you look earlier in the thread, i showed how to hide a field on the form:

<tr id="trDescription" runat="server" style="display:none">

vmwaredownload
Enthusiast
Enthusiast

It worked JamesMW!! Thanks!

0 Kudos
T1gerShark
Enthusiast
Enthusiast

It's worth noting that if you upgrade IaaS at a later date (or even patch IaaS) that your changes here may be overwritten, or the MSP installation may file.

justsaying

0 Kudos
beefy147
Enthusiast
Enthusiast

sorry to bring up an old thread but very useful

what are the required edits I need to make in order to make the location field mandatory?

I have followed the description example but cant seem to get it working. I assume as the field type is different (a drop down box)

any help appreciated

0 Kudos
beefy147
Enthusiast
Enthusiast

managed to resolve. the validation needs to take place on the combo-box

e.g.

<dxe:ASPxComboBox DropDownStyle="DropDownList" ID="ddlLocation" runat="server" IsRequired="true">

  <ValidationSettings RequiredField-IsRequired="true" RequiredField-ErrorText="<%$Resources:Messages,RequiredField%>" SetFocusOnError="true"/>

     </dxe:ASPxComboBox>

0 Kudos