Skip to main content
Question

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

  • Jan 23, 2024 3:12 AM UTC
  • 13 replies
  • 274 views
  • Translate All

nhatnghetinh
Captain II
Forum|alt.badge.img+15

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

dcomerford
Captain II
Forum|alt.badge.img+16
  • Captain II
  • Jan 23, 2024 12:58 PM UTC

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

Translate

nhatnghetinh
Captain II
Forum|alt.badge.img+15
  • Author
  • Captain II
  • Jan 24, 2024 1:17 AM UTC

Hi @dcomerford,

Version 2020 R1

 

Best Regards,

NNT

Translate

dcomerford
Captain II
Forum|alt.badge.img+16
  • Captain II
  • Jan 24, 2024 9:22 AM UTC

@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 :-)

Translate

nhatnghetinh
Captain II
Forum|alt.badge.img+15
  • Author
  • Captain II
  • Jan 24, 2024 9:39 AM UTC

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

 

Translate

Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • Mar 19, 2024 8:17 PM UTC

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

Translate

nhatnghetinh
Captain II
Forum|alt.badge.img+15
  • Author
  • Captain II
  • Mar 22, 2024 7:54 AM UTC

Hi @ Chris Hackett

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

 

Best Regards,

NNT

Translate

Atiq
Jr Varsity III
Forum|alt.badge.img
  • Jr Varsity III
  • Mar 22, 2024 4:45 PM UTC

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>))] 

Translate

nhatnghetinh
Captain II
Forum|alt.badge.img+15
  • Author
  • Captain II
  • Mar 23, 2024 2:09 AM UTC

Hi @Atiq,

After publishing, the error is reported as below.

 

Note: Acumatica Version 2020.R1

Best Regards,

NNT

Translate

Atiq
Jr Varsity III
Forum|alt.badge.img
  • Jr Varsity III
  • Mar 23, 2024 7:33 PM UTC

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

Translate

Atiq
Jr Varsity III
Forum|alt.badge.img
  • Jr Varsity III
  • Mar 24, 2024 10:18 PM UTC

hi @nhatnghetinh ,

is this issue fixed?

Translate

nhatnghetinh
Captain II
Forum|alt.badge.img+15
  • Author
  • Captain II
  • Mar 25, 2024 1:42 AM UTC

Hi @Atiq ,

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

 

Best Regards,

NNT

Translate

Atiq
Jr Varsity III
Forum|alt.badge.img
  • Jr Varsity III
  • Mar 26, 2024 12:46 AM UTC

Hi @nhatnghetinh ,

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

Translate

nhatnghetinh
Captain II
Forum|alt.badge.img+15
  • Author
  • Captain II
  • Mar 26, 2024 3:09 AM UTC

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

Translate