Making the vCAC Description (and potentially any other) Field Mandatory

How many times have you provisioned a VM in your virtual enviroment, only to find out that you have no idea what its for a few weeks later?

One of the main difficulties in a self-serviced environment , is that this scenario is now a lot more common, as people can create their own VMs, giving them creative names like “MyVM1” for example.

Here’s a little customization tip for you to be able to enforce the description field on your happy vCAC Selfservice portal users.

Customization Steps:

1. Navigate to vCAC selfservice web files directory on your vCAC Server: %programfiles(x86)%VMwarevCACSelf-Service PortalViewsRequests

2. Back up (!!!) your original “NewRequest.cshtml” file and “AppService.cshtml” if your using vCloud vApps

3. Open the file, preferably with  notepad++ or something cshtml/tag aware

3.1 Search for the description label section looking like this:

<label>@Labels.Description</label>

Edit it in order to look like this (added red code):

<label><span class="required">*</span>@Labels.Description</label>

3.2 Edit the next line by adding required attribute, in order to look like this (add red code):

@Html.textareafor(m=>m.MachineRequest.Description, new{ cols=40, rows=4 , id= "descriptionText", TabIndex="1", @class = "k-input", required=""})

4. Do the same for AppService.cshtml , instead there span is a bit different:

<label><span class="required-mark">*</span>@Labels.Description</label>

adding required=”” is exactly the same.

Now, next time someone will try to submit a machine request without a description, he will get:

Enjoy :)

Note: Use this customization at your own risk! not I nor VMware inc. should be held responsible for any changes made in your environment / product


There are no comments.

Leave a Reply

Navigation