Solved

Show/Hide screens a group of fields based on FeaturesSet

  • 12 September 2022
  • 10 replies
  • 329 views

Userlevel 7
Badge +9

Hello everyone,

 

I have a few custom forms (new screens) and a set of fields on Acumatica’s standard screens. I have two questions:

  1. how can I set a screen visibility in the site map based on an enabled/disabled feature from FeaturesSet?
  2. I have a set of fields which are repeating on multiple screens. I know I can set their visibility using RowSelected event on each individual screen but I was wondering is there any easier way of setting a group of fields visibility from FeaturesSet or Setup screens rather than doing on each screen?

 

 

icon

Best answer by Dmitrii Naumov 13 September 2022, 00:40

View original

10 replies

Userlevel 7
Badge +12

Hi @aaghaei Could you please check below article which may help you

Thanks

Userlevel 7
Badge +9

@manikantad18 thank you for the link. As I mentioned in my original post, I can do this through RowSelected but I’m looking for possible alternatives that requires less maintenance when I am adding more screens which are using this group of fields

Userlevel 7
Badge +5

@aaghaei 

You can use features.xml file and there you can define FieldClass that is hidden by a feature. 

However, I must note that the list of enabled features is controlled by a license. In unlicensed instance you can see all feature switches, but in a licensed instance you only see ones that Acumatica allowed for that particular license key. 

So, if you are going to introduce the custom feature switch, you need to work with your Account Manager to make sure that Acumatica will add the needed feature to the licensing server.

Userlevel 7
Badge +18

Hi @aaghaei  Just FYI,  to enable/disable the screens based on the features screen, here is the sample example and it is tied to the license as indicated by Dmitry.

Hope this helps you

https://asiablog.acumatica.com/2021/10/add-new-custom-feature-to-the-enable-disable-features-screen-cs100000.html

 

Userlevel 7
Badge +9

 

 

Thank you @Dmitrii Naumov & @Naveen Boga 

 

I followed the instructions and here is the xml file but still the screens are always visible in the site map. What else am I missing? 

 

 

 

 

 

 

 

 

Userlevel 7
Badge +5

@aaghaei please see here:

https://help-2022r1.acumatica.com/(W(1))/Help?ScreenId=ShowWiki&pageid=8285172e-d3b1-48d9-bcc1-5d20e39cc3f0

 

For features.xml to work you need to do two things:

  1. the file Build Action property  must be set to Embedded Resource in Visual Studio
  2. The path to the file must match the namespace.

In your case you clearly do not have the #2. If your featurex.xml file is in the root of the project, the namespace of the HCLMFeaturesSetExt class must be equal to the project name.

Userlevel 7
Badge +9

Thanks, @Dmitrii Naumov The #1 is now set to “Embedded Resources” and my NS is HCL as you can see below but still doesn’t work. Here is the FeaturesSet extension snippet. Any thoughts on what else could cause the issue? should they both be in the root folder?

 

 

Userlevel 7
Badge +9

@Dmitrii Naumov UPDATE: based on the changes you suggested above, now the real data entry screen (HC205000) is showing/hiding properly but the inquiry screens (the other two) always are visible. Any thought?

Userlevel 7
Badge +9

@manikantad18 I added the below to my DAC instead of repeating codes in the RowSelected even of each screen. FYI In case you come across a similar case.

 

[PXUIVisible(typeof(Where<Current<HCLSMFeaturesSet.usrHCLAdvanceApprovalWorkflow>, Equal<True>>))]
[PXUIEnabled(typeof(Where<Current<HCLSMFeaturesSet.usrHCLAdvanceApprovalWorkflow>, Equal<True>>))]
 

Userlevel 7
Badge

Thank you for sharing the additional information with the community @aaghaei !

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