User Tools

Site Tools


syntax_editor_macros

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
syntax_editor_macros [01/07/2025 13:14] johnsonjohnsyntax_editor_macros [12/31/2025 05:42] (current) – removed johnsonjohn
Line 1: Line 1:
-======Syntax Editor Macros====== 
----- 
-=====Client-Side Key Concepts===== 
-====JWJ==== 
-<code> 
-//name jwj 
-//Text 
-//Client-Side Key Concepts 
-c_GeneratingMessages 
-c_GlideAjaxMethod 
-c_GlideRecordDatabaseAccess 
-c_GlideRecordGetReferenceDatabaseAccess 
-c_ReusableScript 
-c_ScratchpadDatabaseAccess 
-c_TryBlock 
-  
-//Server-Side Key Concepts 
-s_AjaxFunctionDefinition 
-s_CurrentAndPreviousGlideRecordObjects 
-s_EventDefinitionAndTriggering 
-s_ExcelFileProcessing 
-s_GeneratingMessages 
-s_GlideRecordDatabaseAccess 
-s_GlideRecordDatabaseInsert 
-s_JavaScriptArrays 
-s_JavaScriptObjects 
-s_LibraryClassAndFunctionUsage 
-s_LibraryClassDefinition 
-s_LibraryFunctionDefinition 
-s_MailScript 
-s_ScratchpadPopulation 
-s_SetRedirectURLFunction 
-s_TryBlock 
-</code> 
----- 
  
-====c_GeneratingMessages==== 
-<code> 
-//text 
-//alert(), addInfoMessage(), showFieldMsg(), jslog(), addDecoration() 
-  
-//Context: Most client side code. 
-  
-//Ways to generate messages from client side code: 
-//Use the alert() function to show a prominent and blocking modal dialog which must be explicitly dismissed for execution to continue. 
-//Display a message to the user from Client code using g_form.addInfoMessage() or g_form.addErrorMessage() 
-//Use g_form.addDecoration() to show a small graphic symbol by a form field label.  A mouse-over popup hint may be included, and a color may be specified. 
-//Use g_form.flash() to display a flashing colored background box behind a form field label. 
-//Use the confirm() function to display a modal popup dialog to get a response (OK or Cancel) from the user before continuing execution. 
-//Use the jslog() function to write a message to the web browser console. 
-function onLoad() { 
-                alert("My Alert Message"); //Modal dialog with OK button.  
-                 
-                g_form.addErrorMessage("My Error Message"); //Wide message at top of form in Red. 
-                g_form.addInfoMessage("My Info Message"); //Wide message at top of form in Blue. 
-                 
-                g_form.showFieldMsg("name", "My Field Message"); //Message UNDERNEATH field.  Same width as field.  Displayed in blue. 
-                g_form.showFieldMsg("name", "My Field Message - info", "info"); //Again, message UNDERNEATH field.  Same width as field.  Displayed in blue. 
-                g_form.showFieldMsg("name", "My Field Message - error", "error"); //Message UNDERNEATH field.  Same width as field.  Displayed in red. 
-                g_form.showFieldMsg("name", "My Field Message - warning", "warning"); //Message UNDERNEATH field.  Same width as field.  Displayed in orange. 
-                 
-                jslog("My jslog Log"); //Sends a message to the web browser console log seen using F12. 
-  
-                g_form.addDecoration("name", "icon-user", "This icon is called icon-user"); //Icon to the left of field. 
-                g_form.addDecoration("name", "icon-tree", "This icon is called icon-tree", "color-green"); 
-                g_form.addDecoration("name", "icon-lightbulb", "This icon is called  icon-lightbulb", "color-red"); 
-                 
-                g_form.flash("name", "#AAFACD", -4); //Yellow highlight bar over field for 4 seconds. 
-  
-                var vResult = confirm("My Confirmation Message") ? "User clicked OK" : "User clicked Cancel"; //Modal dialog with 2 buttons. 
-                g_form.addInfoMessage(vResult); //Wide message at top of form in Blue. 
-} 
-</code> 
----- 
- 
-====c_GlideAjaxMethod==== 
-<code> 
- 
-</code> 
----- 
- 
-====c_GlideRecordDatabaseAccess==== 
-<code> 
- 
-</code> 
----- 
- 
-====c_GlideRecordGetReferenceDatabaseAccess==== 
-<code> 
- 
-</code> 
----- 
- 
-====c_ReusableScript==== 
-<code> 
- 
-</code> 
----- 
- 
-====c_ScratchpadDatabaseAccess==== 
-<code> 
- 
-</code> 
----- 
- 
-====c_TryBlock==== 
-<code> 
- 
-</code> 
- 
----- 
-=====Server-Side Key Concepts===== 
-====s_AjaxFunctionDefinition==== 
-<code> 
- 
-</code> 
----- 
- 
-====s_CurrentAndPreviousGlideRecordObjects==== 
-<code> 
- 
-</code> 
----- 
- 
-====s_EventDefinitionAndTriggering==== 
-<code> 
- 
-</code> 
----- 
- 
-====s_ExcelFileProcessing==== 
-<code> 
- 
-</code> 
----- 
- 
-====s_GeneratingMessages==== 
-<code> 
- 
-</code> 
----- 
- 
-====s_GlideRecordDatabaseAccess==== 
-<code> 
- 
-</code> 
----- 
- 
-====s_GlideRecordDatabaseInsert==== 
-<code> 
- 
-</code> 
----- 
- 
-====s_JavaScriptArrays==== 
-<code> 
- 
-</code> 
----- 
- 
-====s_JavaScriptObjects==== 
-<code> 
- 
-</code> 
----- 
- 
-====s_LibraryClassAndFunctionUsage==== 
-<code> 
- 
-</code> 
----- 
- 
-====s_LibraryClassDefinition==== 
-<code> 
- 
-</code> 
----- 
- 
-====s_LibraryFunctionDefinition==== 
-<code> 
- 
-</code> 
----- 
- 
-====s_MailScript==== 
-<code> 
- 
-</code> 
----- 
- 
-====s_ScratchpadPopulation==== 
-<code> 
- 
-</code> 
----- 
- 
-====s_SetRedirectURLFunction==== 
-<code> 
- 
-</code> 
----- 
- 
-====s_TryBlock==== 
-<code> 
- 
-</code> 
----- 
- 
- 
- 
- 
----- 
syntax_editor_macros.1736284457.txt.gz · Last modified: by johnsonjohn

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki