Skip to content

Instantly share code, notes, and snippets.

@smarenich
Last active November 27, 2015 08:41
Show Gist options
  • Save smarenich/2732719dfd5fe2bda304 to your computer and use it in GitHub Desktop.
Save smarenich/2732719dfd5fe2bda304 to your computer and use it in GitHub Desktop.
//Defining action DataView
public PXAction<MyDAC> MyButton;
//Defining Button Attribute with tooltip
[PXButton(Tooltip = PX.Data.Update.Messages.MyTooltip)]
//Providing title and mapping action access rights
[PXUIField(DisplayName = "MyTitle", MapEnableRights = PXCacheRights.Delete, MapViewRights = PXCacheRights.Delete)]
protected void myButton()
{
WebDialogResult result = Companies.Ask(ActionsMessages.Warning, PXMessages.LocalizeFormatNoPrefix("My Message"),
MessageButtons.OKCancel, MessageIcon.Warning, true);
//checking answer
if (result != WebDialogResult.OK) return;
//Do usefull stuff.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment