V11 Dialog2 or Alpha Anywhere (V12) UX component

General Rules

oEnsure the HTML Editor property is unchecked for the field with the CKEditor applied.

oReplace 'FIELDNAME' with your component's fieldname.

oNote that function parameters must be in all capital letters.

Additional Requirements

oRequired - add a hidden character control named “editor_dummy” to your dialog. Check "Hide" so the whole control is hidden.

oWhen opening the Dialog/UX from another component using a Button, be sure to un-check the box Use Cached Dialog/UX Component.

Notes

oInstructions here do not apply to the "Dialog" component found in V10 and described as "legacy" in V11 and beyond.

oAlthough not necessary, if you are using Alpha Anywhere (V12) you can replace all occurrences of the term "DIALOG2" below with "UX".

Condition

Add code to this client-side event

Code

Update Record is allowed

canSubmitDialog

ckUpdate('UX','{Dialog.ComponentName}');

View Record is allowed

onInitailzeComplete

if(window.location.protocol.indexOf("http")>=0) {
ckInstance('UX','FIELDNAME','{Dialog.ComponentName}'); // repeat this line as necessary for each field
}

Examples applied to four different textarea fields on same Detail View

if(window.location.protocol.indexOf("http")>=0) {
ckInstance('UX','ADDRESS','{Dialog.ComponentName}');
ckInstance('UX','DIRECTIONS','{Dialog.ComponentName}','Basic','300','100');
ckInstance('UX','COMMENTS','{Dialog.ComponentName}','Full');
ckInstance('UX','MORECOMMENTS','{Dialog.ComponentName}','','','',"uiColor:'#FF0000'");
}

Update Record as List Control Detail

afterDetailViewPopulate

If you use a List Control with Detail View set in the Properties, find this client-side event on the List Control Detail tab under Client-side Events.

ckInstance('UX','ADDRESS','{Dialog.ComponentName}');