I had to add some required field validation around some of the input fields in project I am working on. Nicholas Galler provided an excellent method in his blog at http://blog.chivinou.net/2008/05/13/required-textbox-on-saleslogix-web-client/

So I went into the VFS and edited the template for the text edit control and renamed the control to have the _req suffix, compiled and deployed. In checking the quick form I noticed that the output was not updated to include the new RequiredFieldValidator. After a moment of head scratching I came to the conclusion that the templates that are displayed in the VFS were not the ones were getting applied in the build process. So after some digging it looks as if the VFS explorer shows the templates from the DB while when in a build the templates are being used from my file based VFS.  To confirm this a browsed over to the appropriate directory and edited the template there.

Now since I was in the file base template and this is really the first time I have edited a control template I decided to add a new process step in to my development cycle. I created a new folder under my root project to copy the template into and I can make the edits there from now. It also puts the edited templates into a single place for easier consumption in future projects.

Once the template was edited, I rebuild and deployed and the code was altered as expected. So lesson learned, if you are using a file based VFS not all things in the editors are where you expect they should be.

Note the updated template look on the text edit control

image

 

Happy coding

Leave a Reply