Skip to main content

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 

@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


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)]
                tARInvoiceTypeExtn]
        yPXUIField(DisplayName = "Type", Visibility = PXUIVisibility.SelectorVisible, Enabled = true, TabOrder = 0)]
        bPXFieldDescription]
        protected virtual void ARInvoice_DocType_CacheAttached(PXCache cache)
        {
        }

        public class ARInvoiceTypeExtn : PXStringListAttribute
        {
            public ARInvoiceTypeExtn() : base(
                newl]
            {
              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
    }
 


@danamoffat89 

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


Reply