Question

How to enable the Owner field on the Event screen (CR306030) so that it can be selected ?

  • 23 January 2024
  • 13 replies
  • 193 views

Userlevel 3
Badge

Dear ALL,

The Event screen (CR306030) was missing an Owner, so I added it by performing Create Controls with the OwnerID field (Display name: Created By).

 

 

 

I have also done:

  • CommitChanges = true
  • Enabled = true 

 

 

But the result of Customization is that the Owner field is still not enabled so it cannot be selected.

 

Please guide me how to handle it !

 

Best Regards,

NNT

 


13 replies

Userlevel 7
Badge +12

Hi what version are you trying to do this on as OwnerID is available on the screen on 23R2?

Userlevel 3
Badge

Hi @dcomerford,

Version 2020 R1

 

Best Regards,

NNT

Userlevel 7
Badge +12

@nhatnghetinh Yes i can see same issue on that version has to be something in the code blocking the Selector. Can you suggest they upgrade :-)

Userlevel 3
Badge

Hi ALL,

I have tried creating Events.RowSelected as below:

 

//////////////////

namespace PX.Objects.EP
{
  public class EPEventMaint_Extension : PXGraphExtension<EPEventMaint>
  {
    #region Event Handlers
 
    protected virtual void _(Events.RowSelected<CRActivity> e)
    {

         CRActivity row = e.Row as CRActivity;
            if (row != null && Base.Events.Current != null)
            {
                
              Base.Events.Cache.AllowUpdate = true;
              PXUIFieldAttribute.SetEnabled<CRActivity.ownerID>(e.Cache, row, true);
            }  
    }

    #endregion
  }
}

///////////////

 

The result of Customization is that the Owner field is enabled.

 

 

However, after selecting a different Owner from the default, the Event screen is closed and the data is not saved.

 

 

Please help me how to resolve the error !

 

Note: Acumatica Version 2020R1

 

Best Regards,

NNT

 

Userlevel 7
Badge

Hi @nhatnghetinh were you able to find a solution? Thank you!

Userlevel 3
Badge

Hi @ Chris Hackett

I haven't found a solution yet, it's still pending.

 

Best Regards,

NNT

Userlevel 3
Badge

Hi @nhatnghetinh , @dcomerford,

                              The Problem is because you have written the wrong selector DAC code for Owner Feild. 

Can you write this Piece of code in ‘Owner Id’ DAC and Check Wether it works

 

 

[PXChildUpdatable(AutoRefresh = true)] [Owner(typeof(workgroupID))] [PXDefault(typeof(Coalesce< Search<EPCompanyTreeMember.contactID, Where<EPCompanyTreeMember.workGroupID, Equal<Current<workgroupID>>, And<EPCompanyTreeMember.contactID, Equal<Current<AccessInfo.contactID>>>>>, Search<Contact.contactID, Where<Contact.contactID, Equal<Current<AccessInfo.contactID>>, And<Current<workgroupID>, IsNull>>>>), PersistingCheck = PXPersistingCheck.Nothing)] [PXFormula(typeof(Default<workgroupID>))] 

Userlevel 3
Badge

Hi @Atiq,

After publishing, the error is reported as below.

 

Note: Acumatica Version 2020.R1

Best Regards,

NNT

Userlevel 3
Badge

Hi @nhatnghetinh ,

        You Should Create a Visual studio Extension, and run the code in it, may be you need to add some references in it

Userlevel 3
Badge

hi @nhatnghetinh ,

is this issue fixed?

Userlevel 3
Badge

Hi @Atiq ,

It is still pending. Can it run on Customization Project Editor without Visual studio ?

 

Best Regards,

NNT

Userlevel 3
Badge

Hi @nhatnghetinh ,

                                  i Highly recommend, to go through all the T - series cources before you start working on customizations 

Userlevel 3
Badge

Hi @Atiq ,

I see that the code in ‘OwnerID DAC attributes’ you sent is for higher Acumatica versions (from 2022.R2). I also tried ‘OwnerID DAC attributes’ of higher Acumatica versions running on our Acumatica version (2020.R1) before but without success.
I'm not sure if it's possible to use ‘OwnerID DAC attributes’ of higher Acumatica versions for our Acumatica version (2020.R1)? If so, specifically how to do it?

Best Regards,

NNT

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 — 2024  Acumatica, Inc. All rights reserved