Skip to main content
Solved

Change Displayname from underlying field


Forum|alt.badge.img

Hey

i would like to change a display name from a field within the attribute editor
but everytime i try to click on “Change Attributes” it shows i cant edit the attributes because the underlying field is a replacement. How can i edit it if this error message appears?
i am looking since hours and cant find a solution.

Best answer by Naveen Boga

Since you are looking to this Time field, yes we need to work with TImeCardMaint.

Please use the below code to modify the Display Name as required

 [PXMergeAttributes(Method = MergeMethod.Merge)]
        [PXDBDateAndTime(DisplayNameDate = " Date", DisplayNameTime = "Start", UseTimeZone = true)]
        [PXUIField(DisplayName = "Date")]

        protected virtual void EPTimecardDetail_Date_CacheAttached(PXCache cache)
        {
        }

 

 

 

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

11 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3417 replies
  • April 21, 2021

Hi, @jwestermann17 What filed you would like to change the display name? Can you please provide more details on this requirement?


Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • 117 replies
  • April 21, 2021

Hello.

We would like to change the Display Name of a Field inside the EP305000 Screen.
In the Screen → Tab Details → Grid: Activities → Date_Time 

We made some changes to the screens to fit with the requirements from our customer. 
Since we added fields like “Break” and “End Time” we would like to change “Date_Time” to the DisplayName “Start” 

 


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3417 replies
  • April 21, 2021

Hi, @jwestermann17 

Can you please confirm that you wanted to change the display name for the below-highlighted field?
 


Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • 117 replies
  • April 21, 2021

Hi @Naveen B 

We are using the german version from Acumatica called Lexbizz, so it might not be at the same location.
I would like to change the Display Name of this field:
 

I get the same error trying to customize attributes in Acumatica, so i am sure its not a lexbizz problem. 

 

 

Greetings


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3417 replies
  • April 21, 2021

Please find the cache mechanism technique to rename the Displayname field. Please find the example below.

 

public class CRActivityMaintEXT : PXGraphExtension<CRActivityMaint>
    {
        [PXMergeAttributes(Method = MergeMethod.Merge)] 
        [PXUIField(DisplayName = "Start")]
        protected virtual void CRActivity_StartDate_CacheAttached(PXCache cache)
        {
        }
    }


Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • 117 replies
  • April 21, 2021

Where would i implement the change?
Can i click on Attributes and “Override on Screen-Level” and implement the code?


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3417 replies
  • April 21, 2021

In the package, go to the code section, Click on the + icon, and select the “Graph Extension” and the required graph and add above just like below and then publish the package.

 

 

 

 


Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • 117 replies
  • April 21, 2021

Thank you. But i believe “TimeCardMaint” is the right Extension, or?

I get the error that some ; are missing.
But whenever i add one after the lines (the last one) it tells me there must be a declared body marked abstract, extern or partial. 

Looks like this now: 

 

 


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3417 replies
  • Answer
  • April 21, 2021

Since you are looking to this Time field, yes we need to work with TImeCardMaint.

Please use the below code to modify the Display Name as required

 [PXMergeAttributes(Method = MergeMethod.Merge)]
        [PXDBDateAndTime(DisplayNameDate = " Date", DisplayNameTime = "Start", UseTimeZone = true)]
        [PXUIField(DisplayName = "Date")]

        protected virtual void EPTimecardDetail_Date_CacheAttached(PXCache cache)
        {
        }

 

 

 


Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • 117 replies
  • April 21, 2021

Hey works perfect!
Where do i see the PXDB Name of fields that occur with this error? 
Do i have to look at the Datafield Name (f. E. Date_time) and can assume _ is a equivalent to “and” ? 

--

Now i just need to find out how to edit the combobox value of this field..
Normal way doesnt seem to work, so i guess it needs to be with code.
 


Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • 117 replies
  • April 23, 2021

Hey, i thought before making a new topic i should ask here..

We would like to add user fields (UsrEz) for example with time mode, the time dropdown list and editable.
Works on the EP307000 Screen, but not on the EP305000 Screen. Field just wont accept that it should have time mode with input mask hh:mm and if we write something in it it only looks for the dropdown values. Any ideas?


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