Supriya13
Giga Expert
MethodsAlternative Solution
getReference() not supported Use GlideAjax or getReference() with callback()
GlideWindow Not supportedUse g_modal.showframe 
gsftSubmit() not supported in ui action to call server side codeg_form.submit(g_form.getActionName()); Used 

System stored message (sys_us_message)

 not suppoted

Can use direct text message using , gs.addMessage("test",type) /gs.addInfoMessage("text")/ etc.

current.abortAction () not supported

Create script at global scope and call it in scoped application side

getXmlWait() not suppoterd 

Use getXml() with callback function
Jelly Script / JSON not supported -hence UI page will not workConvert them to UI action - and provide similar  functionality

 

1.UI action  

  • 1.1 Workspace client script -- Used to write client side code                    
  • 1.2 Script code - Used to write server side code                       
  • 1.3 UX format configurable - Check true - to visible on foem level                                             
  • 1. 4 Custom UI action should be created in that scoped application.

 

 

2.Client Script  

  • 1.1 Client script with UI type - All - in global scoped supports                
  • 1.2 If client script contains GlideAjax() with getxmlwait () - not supported                    

 

Example -

G_modal 

 

var fields = [
        
        {
            type: 'reference',  // Reference field 
            name: 'assignment_group',
            label: getMessage('Assignment Group'),
            mandatory: true,
            reference: 'sys_user_group',
            referringTable: 'incident',  // applied on which field 
            referringRecordId: g_form.getUniqueValue()
        },
        {
        type: 'textarea',    //text type field 
        name: 'work_notes',
        label: getMessage('Work Notes'),
        mandatory: true
    },
    ];

    g_modal.showFields({
        title: "Assign ticket to yourself",  // Name of page 
        fields: fields,
        size: 'lg'
    }).then(function(fieldValues) {
        g_form.setValue('work_notes', fieldValues.updatedFields[1].value);  // seting value to work notes
        g_form.setValue('assignment_group', fieldValues.updatedFields[0].value); // setting the value to assignment group
        g_form.save();
    });
}

 

Please mark Helpful, if applicable.

 

Thanks,

Supriya

Comments
Vadim Surin
Tera Explorer

Hi.
Is it possible to implement dependent logic with g_modal.showfields()?
What I mean.
For example, on incidents  we have 2 fields: Category and Subcategory where Subcategory is dependent on Category.
When we choose Category then Subcategory list is updating according to selected Category.
Need to implement same logic with g_modal.showfields() if it is possible.

Version history
Last update:
‎08-23-2022 04:44 AM
Updated by: