Solved

Restrict AR Invoice, Document type for users

  • 26 January 2022
  • 3 replies
  • 76 views

Userlevel 1

Hello!

Is there any possible way to restrict some of the document types for users? 

For example, we need to restrict the ‘Credit Memo’ document type for one user.

Thank You,

Regards 

Amanda 

icon

Best answer by jinin 27 January 2022, 06:57

View original

3 replies

Badge

@danamoffat89 

I'm glad to see that I not the only one requesting this, also as listed in my list of complaints.

Userlevel 7
Badge +3

Hi @apallawala21 

We can achieve this through customization. We need to customize the Doc. Type field and restrict the types. Need to provide conditions based on the User Role.
 

 

Sample code:

public class SOInvoiceEntry_Extension : PXGraphExtension<SOInvoiceEntry>
    {
        #region Event Handlers
        [PXDBString(3, IsKey = true, IsFixed = true)]
        [PXDefault()]
        [ARInvoiceTypeExtn]
        [PXUIField(DisplayName = "Type", Visibility = PXUIVisibility.SelectorVisible, Enabled = true, TabOrder = 0)]
        [PXFieldDescription]
        protected virtual void ARInvoice_DocType_CacheAttached(PXCache cache)
        {
        }

        public class ARInvoiceTypeExtn : PXStringListAttribute
        {
            public ARInvoiceTypeExtn() : base(
                new[]
            {
              Pair(ARDocType.Invoice,ARDocType.GetDisplayName(ARDocType.Invoice)),
              Pair(ARDocType.CashSale,ARDocType.GetDisplayName(ARDocType.CashSale)),
              Pair(ARDocType.CashReturn,ARDocType.GetDisplayName(ARDocType.CashReturn)),
             // Pair(ARDocType.DebitMemo,ARDocType.GetDisplayName(ARDocType.DebitMemo)),            
               })
            { }
        }

        #endregion
    }
 

Userlevel 2
Badge

@danamoffat89

I'm glad to see that I not the only one requesting this, also as listed in my list of complaints.

Thank you for highlighting that I hope in the future release this will be addressed in a simple manner

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2022  Acumatica, Inc. All rights reserved