Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
using System;
using PX.Objects;
using PX.Data;
namespace PX.Data
{
public class LEPMaint_Extension : PXGraphExtension<LEPMaint>
{
#region Event Handlers
public PXAction<PX.Data.ListEntryPoint> ToggleActivation;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Toggle Activation")]
protected void toggleActivation()
{
ListEntryPoint first = Base.Items.Select();
if(first != null)
{
bool val = !first.IsActive ?? false;
foreach(ListEntryPoint row in Base.Items.Select())
{
row.IsActive = val;
Base.Items.Update(row);
}
}
}
#endregion
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.