Page 1 of 1

Direct link for add/edit page

Posted: Sat Jun 09, 2018 7:11 pm
by ConstanceLake

I need a direct link or button in the navigation pane to open an ad/edit page of a table. Actually only the basis table will open and I need o click the add /edit button for maintaining data. Would like to save one step by direct link to the add/edit menu. How to do this?

Thanks for help, Thomas


Re: Direct link for add/edit page

Posted: Mon Jun 11, 2018 10:48 am
by motfs

I need a direct link or button in the navigation pane to open an ad/edit page of a table

You can add the link in your menu by using the menueditor to create a menu for Add Page of your table. Read Tools -> Menu Editor in help file for more detail. But you still need a key for Edit Page so it is still need to click on the Edit button to edit the specific record.


Re: Direct link for add/edit page

Posted: Mon Jun 11, 2018 2:48 pm
by kirondedshem

Do what mofts is recommending,
for add links
add your custom menu item in menu editor, then set the link to link to add page of your table. eg customeradd

for edit links

  1. if you know the exact record you need to edit then set the edit link with its id
  2. if the record to be edited can vary for some reason then set empty edit link eg = /vw_my_profileedit/#.
    Then use menu adding to determine what id of record is to be edited and modify the link of that menu item to add that link eg

public bool MenuItem_Adding(MenuItem item) {
//VarDump(item);
// Return false if menu item not allowed

	//put employees id on profile menu

	if (item.Url == "/vw_my_profileedit/#")
	{
		//get current user's id
		if (CurrentUserID() != null && !SameString(CurrentUserID(), ""))
		{
			//add userid to url
			item.Url = item.Url.Replace("#", CurrentUserID());

	
		}
		

	}
				
	return true; // Return true if the user has already logged in

}


Re: Direct link for add/edit page

Posted: Tue Jun 12, 2018 2:58 am
by ConstanceLake

Thanks a lot for help, direct add link and disable messages is working fine now.
Best regards, Thomas