Skip to main content
Solved

CaptionVisible property seemingly ignored?


charliefitzgerald13
Freshman I

 Hello! I am new to customization so I apologize if any of this is hard to follow or a strange approach, I am actively learning and very open to input. 

 

Also, please ignore the title as my original post was a bit of a rabbit hole question regarding a misstep I took in solving this issue.

 

My issue is in regards to seemingly hidden business logic that I cannot make sense of. I am currently attempting to add a contact selector to the Shipment (SO302000) that allows me to select a contact and updates the Ship-To-Contact area of the form. In my graph extension, the fields under the ship to contact area are getting updated by those of the contact I choose in the top right. However, this interaction only works when the "Override Contact” checkbox is ticked. I attempted to remove the checkbox, however that makes the fields in this area all permanently disabled. I am confused by this behavior as it seems to me like removing the checkbox should remove the enable/disable behavior of this area, but that is not the case.

 

Any help in investigating this issue further or general advice in understanding the underlying behavior of a form like this is greatly appreciated. Thank you.

 

 

Best answer by darylbowman

Are you wanting the fields to be constantly enabled or you just want to be able to change them programmatically and you haven’t been able to do so without using the ‘override’?

If I remember correctly, these fields are controlled by the ShipContactID. Have you tried setting that to your chosen contactID?

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

7 replies

aaghaei
Captain II
Forum|alt.badge.img+9
  • Captain II
  • 1179 replies
  • July 24, 2024

Unless you use JS I don’t believe you can dynamically change the fields display name. The display names are created when pages is initialized. I have been through this year or two back.


charliefitzgerald13
Freshman I
aaghaei wrote:

Unless you use JS I don’t believe you can dynamically change the fields display name. The display names are created when pages is initialized. I have been through this year or two back.

Hi Reza, thank you so much for your answer. I realized my post was framed around a workaround as opposed to addressing the underlying problem, and revised it to ask about my initial problem that caused me to arrive at that strange workaround. Let me know if you have any additional insight based on my revised question? Thank you.


aaghaei
Captain II
Forum|alt.badge.img+9
  • Captain II
  • 1179 replies
  • July 24, 2024

In this case I am guessing if you look into the Base Graph or its inherited extensions, you will see there is a CacheAttached event that sets the fields in question visibility to False (or maybe a RowSelected). Just copy/paste those CacheAttached event(s) to your graph extension and update the PXUIVisible condition as you want or set it to True and instead add PXUIEnabled property and set the where clause as you wish.


darylbowman
Captain II
Forum|alt.badge.img+13
  • 1608 replies
  • Answer
  • July 25, 2024

Are you wanting the fields to be constantly enabled or you just want to be able to change them programmatically and you haven’t been able to do so without using the ‘override’?

If I remember correctly, these fields are controlled by the ShipContactID. Have you tried setting that to your chosen contactID?


charliefitzgerald13
Freshman I
aaghaei wrote:

In this case I am guessing if you look into the Base Graph or its inherited extensions, you will see there is a CacheAttached event that sets the fields in question visibility to False (or maybe a RowSelected). Just copy/paste those CacheAttached event(s) to your graph extension and update the PXUIVisible condition as you want or set it to True and instead add PXUIEnabled property and set the where clause as you wish.

Thank you so much again for your response-- where would I go looking for this base graph and CacheAttached event? 


charliefitzgerald13
Freshman I
darylbowman wrote:

Are you wanting the fields to be constantly enabled or you just want to be able to change them programmatically and you haven’t been able to do so without using the ‘override’?

If I remember correctly, these fields are controlled by the ShipContactID. Have you tried setting that to your chosen contactID?

Thanks for your response Daryl-- I have not tried updating the ShipContactID but looking at the table in SQL this appears to be a solid route and I will try that now.

On a separate note, for a form like this, where might I find the site logic that dictates these fields are controlled by the ShipContactID? 


darylbowman
Captain II
Forum|alt.badge.img+13

Inspect the contact fields to get the data view name:

 

Find the data view in SOShipmentEntry.cs:

 

Notice the association on shipContactID


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