Copying a Value to the Clipboard on a Creatio Freedom UI Page

On a Freedom UI page, you can execute requests to perform various actions, such as to display a message dialog, a toast message, open a page, reloading a list or page, etc. One of the available types of requests you can execute is to copy a value to the clipboard. This request is called a crt.CopyClipboardRequest. All you need to do is to execute this request and pass a value to copy.

Let’s take a look how it works:

request.$context.executeRequest({
	type: "crt.CopyClipboardRequest",
	value: "Some text to copy"
});

A great combination is to also follow this up with a toast message to let the user know the value has been copied, such as the following example (don’t forget to await the crt.CopyClipboardRequest to allow it to complete before you show the toast):

await request.$context.executeRequest({
	type: "crt.CopyClipboardRequest",
	value: "Some text to copy"
});
request.$context.executeRequest({
	type: "crt.NotificationRequest",
	message: "The text has been copied to the clipboard"
});

This way, the user see an out of the way message that the value has been copied. It especially makes a nice addition to a list’s row actions to copy values from the row:

ABOUT THE AUTHOR

Ryan Farley

Ryan Farley is the Director of Development for Customer FX and creator of slxdeveloper.com. He's been blogging regularly about SalesLogix, now Infor CRM, since 2001 and believes in sharing with the community. His new passion for CRM is Creatio, formerly bpm'online. He loves C#, Javascript, web development, open source, and Linux. He also loves his hobby as an amateur filmmaker.

Submit a Comment

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

Subscribe To Our Newsletter

Join our mailing list to receive the latest Infor CRM (Saleslogix) and Creatio (bpm'online) news and product updates!

You have Successfully Subscribed!