Verivo’s platform allows users invoke the Good Dynamics for Enterprise email client through the use of the “Click to Native Browse” feature. This feature lets users create a new email in their Good email client by selecting a configured control. This functionality also allows you to preset fields within the email, for example the To and Subject fields.
To successfully invoke the Good email client from a control, you must configure the following properties in the Click Handling section of the control’s properties:
- Action: Click to Native Browse
- Target Screen & View: Leave blank
- Transition Style: ScreenSetting
- Target Control: Set to a text control whose value starts with “gmmmailto:”
The Target Control value must start with “gmmmailto:” to invoke the Good email client. After the “gmmmailto:” prefix, you must specify the email address to which the message should be sent, followed by an optional “?” if you wish to set any additional parameters.
The following is the format to create an email in the Good client:
gmmmailto:<Email Address>?<Option 1>&<Option 2>&<Option 3> …
The options portion of the address gives you the ability to preset fields, such as the email subject. This is a great feature in situations where you want to set up a button control that triggers a standard request for information about a particular record. The following are some options available to you: CC, subject and body.
Below is an example of a lookup control that sends an email to [email protected] and presets additional fields.
gmmmailto:[email protected]?subject=Please Send Info&body=I am requesting AppStudio information
Dynamic Target Control
Typically, the email address that you want to send to is not static and instead depends on the current record selected. The best way to set up the target control in this situation is to create an additional Data Field within the entity. In that newly created Data Field, set the calculated column to the following:
‘gmmmailto:’+ <field that contains the email address>
On the screen that you want to invoke click to email, reference this new data field as the Target Control in the Click Handling section.
Instead of calculated columns, it is also possible to use LUA scripting by updating the Target Control based on the current record selected. For example, the LUA script could append Product information to the body of the email for the current item selected.
* This is subject to change if Good makes any updates to the API
I have put following script to OnLoad event on Screen propery:
local c = thisview:getAllControls()
if (c.ControlName:getValue() ~= "")
c.txtEmail:setValue("gmmmailto:" .. c.ControlName:getValue() .."@emailAddress.com")
txtEmail is Target Control on ControlName field