![]() My goal is to have new Online Code Examples created for the Clip Menu that show off the new features better than my minimal patch notes. I spent a few hours working on some scripts to exercise the routines and noticed quite a few shortcomings in the process. This update is focused on the scripting part. These scripts are a little more complicated than normal, so they'll work on a default install of Windows. These scripts show of how to use the new Clip Menu functions and the Save Clip to Folder functions. This is similar to the Clip Menu script, but it is designed to only work with the clipboard contents. ![]() The Permanent Clip script, called 'Open Clipboard as File (JavaScript)', detects the type of clip on the clipboard and then runs a program that accepts a filename as a command line parameter. This example also uses standard programs that can be replaced. The second Clip Menu script, called 'Paste Clip into Program (JavaScript)', copies the selected clip to the clipboard and then runs a program and simulates a paste. This example uses Notepad, Wordpad, and Paint as standard installed programs, but these can be replaced with any program. The first Clip Menu script, called 'Open Clip as File (JavaScript)', saves the selected clip to a file and then runs a program that accepts a filename as command line parameter. Permanent Clips have their own separate list of example scripts. When "New" is selected from this location, the Online Code Examples shows a list specifically for the Clip Menu. Currently, Clip Menu scripts are accessed under Configuration>Clip Menu>Custom Menus. I've created 2 new Clip Menu scripts and 1 new Permanent Clip script for the "View > Online Code Examples" section. This is important, as we need to select it when configuring the view later.This is a "silent" update. The system name for this web resource isnew_ContactIconScript. I need to add one more web resource to the solution this is where I will store the java script so make sure you select ā Script(JScript)ā as the type. The system names for the web resources are new_male and new_female. I uploaded two web resources into the system, both are in PNG format and their dimensions are 16Ć16. I would recommend the last option, so you can move these configurations easier from one environment to another. You can add them to the default solution or create a new solution and add them there. The second thing I need to do is upload my icons into the system as web resources. You can find this when you open the field and click in the options, the label and value will become visible on the right hand side. The first thing we need to do is get the numerical values of each of the options in the option set: The data type of this field is an option set. The field I am using for this is the out of the box gender (gendercode) field. Below is an example of what it is going to look like. This is a very nice feature you can use to spice up your views and make them visually more appealing. This functionality has been available for quite some time now, but I wanted to write an article about it anyway. Keep in mind I am not a developer, so make sure you check with your developers to make sure the java script example Iām using here is ok to use in production. Yes we can do this, but we do need to use a little java script for this. Last week I was asked if it was possible to show an icon in a view of records: they wanted me to show a male or female icon in the gender column of contacts for the prospect demo.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |