Skip to main content
Solved

To disable 'delete' in header document and enable 'delete' in line document


Forum|alt.badge.img

Hello morning guys,

Is there a way to configure the access right by screen by disabling the delete button in header document and enabling the delete button in the line document? Is that possible?

The screen ID is CA304000.

Thank you in advance.

 

 

Best answer by Manikanta Dhulipudi

HI @chenwm 
 

 

Delete button revoked at the header level

 

Line Level document: I have given the insert rights at the line level so that we can restrict delete option

Thanks

View original
Did this topic help you find an answer to your question?

5 replies

Manikanta Dhulipudi
Captain II
Forum|alt.badge.img+13

HI @chenwm 
 

 

Delete button revoked at the header level

 

Line Level document: I have given the insert rights at the line level so that we can restrict delete option

Thanks


Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • 38 replies
  • October 5, 2022

 

 

Hi @manikantad18 

Thanks for the workaround. I managed to do it in the access right by screen.

 

 

 

 

 


  • Freshman I
  • 1 reply
  • November 22, 2022

Hello, is anyone able to provide more insight on this? I am looking to make a very similar change, but on Sales Orders and Purchase Orders screens rather than ‘Cash Entry’ screen.

 

I had my implementation company help with setting this up, however they set it so that “Delete” has been disabled across everything (both header and line-level). I would like to re-enable users to “Delete” at the line-level, but I cannot tell which Access Rights drop-down I should be selecting from, since the screenshots on this thread are cut-off. I have tried searching within these screens, but only seem to be able to find the “Delete” Access Right on the “Sales Orders” itself, not within the “Sales Orders Lines” (at the line-item level). I would like to learn how to do this in-house as our implementation company has not been the best recently. We are running on 2021R2 Build 21.216.0034

Knowing which Access Rights supersedes the others would help as well, as we have Access Rights customized across both Roles, Users, and now Screens as well.

Thank you all in advance.


ed.goodman
Acumatica Employee
Forum|alt.badge.img+4
  • Acumatica Employee
  • 122 replies
  • December 20, 2022

Hello @mcginn!

I was able to accomplish this in the sales orders screen by setting access as follows.  I will start at the top level and work my way down.

 

 

 

 

With access to the Delete action set to Revoked at the Sales Order level, the user cannot delete the sales order, but can still delete rows from the Details tab.

 


Forum|alt.badge.img
  • Freshman II
  • 10 replies
  • August 24, 2023

We just hid the Actions more dynamically using a rowSelected Event 

namespace PX.Objects.AP
{
    public class APInvoiceEntry_Extension : PXGraphExtension<PX.Objects.AP.APInvoiceEntry>
    {
        #region Event Handlers

        protected void APInvoice_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected InvokeBaseHandler)
        {
            InvokeBaseHandler(cache, e);

            var row = (APInvoice)e.Row;
            var hideActions = false;
            var hideApprovals = false;

            foreach (UsersInRoles role in PXSelect<UsersInRoles, Where<UsersInRoles.username, Equal<Current<AccessInfo.userName>>>>.Select(Base))
            {
                if (role.Rolename == "Project Manager")
                {
                    hideActions = true;
                }
            }

            foreach (UsersInRoles role in PXSelect<UsersInRoles, Where<UsersInRoles.username, Equal<Current<AccessInfo.userName>>>>.Select(Base))
            {
                if (role.Rolename == "Project Accountant")
                {
                    hideApprovals = true;
                }
            }

            if (hideApprovals == true)
            {
                if (Base.Actions["approve"].IsNotNull())
                {
                    Base.Actions["approve"].SetVisible(false);
                }

                if (Base.Actions["reject"].IsNotNull())
                {
                    Base.Actions["reject"].SetVisible(false);
                }
            }

            if (hideActions == true)
            {
                Base.Cancel.SetVisible(false);
                Base.Next.SetVisible(false);
                Base.First.SetVisible(false);
                Base.Previous.SetVisible(false);
                Base.Last.SetVisible(false);
                Base.Insert.SetVisible(false);
                Base.CopyPaste.SetVisible(false);
                Base.putOnHold.SetVisible(false);
                Base.releaseFromHold.SetVisible(false);
                Base.release.SetVisible(false);
                Base.payInvoice.SetVisible(false);
                Base.editVendor.SetVisible(false);
                Base.Delete.SetVisible(false);
                Base.vendorDocuments.SetVisible(false);
                Base.printAPEdit.SetVisible(false);
                Base.printAPRegister.SetVisible(false);
                Base.reclassifyBatch.SetVisible(false);
                Base.createSchedule.SetVisible(false);
                Base.recalculateDiscountsAction.SetVisible(false);
                Base.reverseInvoice.SetVisible(false);
                Base.Actions["releaseRetainage"].SetVisible(false);
                Base.Actions["reclassify"].SetVisible(false);

                if (Base.Actions["saveCloseToList"].IsNotNull())
                {
                    Base.Actions["saveCloseToList"].SetVisible(false);
                }

                if (Base.Actions["cancelCloseToList"].IsNotNull())
                {
                    Base.Actions["cancelCloseToList"].SetVisible(false);
                }
            }
        }
        #endregion
    }
}

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings