Any good sample on how to build smart simple UI page ?

wakespirit
Kilo Guru

Dear all,

I need to build simple pop up UI page for editing user to be more friendly than editing directly records.
I will call this UI page using UI Action.

Is there any good sample, different that basic hello word, on how to build a smart user edit form ?

I guess we need to build some angular script or stuff but not so familiar with it, so good sample will help me to catch the idea and structure.

For example in my User custom UI page I should have basic field which allow creation of a user and a Save button which same my record

Could any one can help on this to start ?

regards

3 REPLIES 3

marcguegueniat
Kilo Sage

Hi,

I have no direct example but I think you should browse the existing OOB UI Pages and see if there is one that would be clos to yours.

You can search for "*dialog UI" Pages.

For example "dialog_index_create" may help you?

The GlideDialogWindow API is maybe what would help you.

Regards,

Prins Kumar Gup
Giga Guru

Hi 

Please see the below link. I believe it's helpful for you.

A sample UI Pages.

Creating a Custom Slushbucket Popup Dialog

GlideDialogWindow: QuickForms

Thanks.

PKG

I manage do mdo it using the GlideDialog Form instead of Glide DialogWindow.

function showUserNewForm(){
	//Get the table name and sys_id of the record
	var tableName = 'x_58872_needit_cascadesequence';
	var sysID = -1;
	
	//Create and open the dialog form
	var dialog = new GlideDialogForm('Create User Member', tableName); //Provide dialog title and table name
	dialog.setSysID(sysID); //Pass in sys_id to edit existing record, -1 to create new record
	dialog.addParm('sysparm_view', 'PopUpUser'); //Specify a form view
	dialog.addParm('sysparm_form_only', 'true'); //Add or remove related lists
	
	dialog.removeCloseDecoration(); // close the system X button
	
	dialog.setLoadCallback(function(iframeDoc) {
		// To get the iframe: document.defaultView in non-IE, document.parentWindow in IE
		var dialogFrame = 'defaultView' in iframeDoc ? iframeDoc.defaultView : iframeDoc.parentWindow;
		
		dialogFrame.g_form.setValue('seqorder', '4');
		dialogFrame = null;
	});
	
	
	dialog.render(); //Open the dialog
}

As you can see I call the PopUpUser which is a simplify view of my user default view.

What I am doing with this also I am removing the DialogBox system X button in order to avoid user to close the window from there.

Now what I am trying to do is to add my own Cancel button on the popup form in order to call my own cancel script inside.

How can I add this Cancel button from my PopUpUser simplified view ? This button should only be visible in the Popupuser

Any idea ?