Skip to main content
Answer

How can I replace a field from an 'included' fieldset in Modern UI?

  • September 29, 2025
  • 4 replies
  • 126 views

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

I’ve done several complicated modifications to out-of-box screens now, but I’ve encountered one I can’t solve.

I need to replace the ‘Phone1’ field of the ‘Contacts’ fieldset on the Contacts screen with another version with an additional button in the same row.

The complication of this task is that the ‘Contacts’ fieldset is a predefined template that is ‘included’. 

CR302000.html - The ‘Details’ tab is ‘included’ from an extension (‘tabGeneral’):

<qp-tabbar id="ContactCurrent_tab" class="label-size-m" wg-container>
<qp-tab id="tabGeneral" caption="General" ref="tabGeneral_Content"></qp-tab>

CR302000_General.html - ‘Contacts’ is ‘included’ from the template form:

<template id="tabGeneral_Content">
<qp-template id="Details-form" name="1-1">
<div slot="A">
<qp-include url="src/screens/common/form-contact-person/form-contact-person.html"
fs-id="tabDetails_Contact"
contact-view="ContactCurrent"
fs-wg-container="ContactCurrent_PXFormView1"
fs-caption="Contact">
</qp-include>

I’ve tried sooo many ways of doing this, but most of them require a CSS selector and the build fails with 

screen 'CR302000' child node 'QP-FIELDSET' has attribute with '#tabDetails_Contact', but screen HTML doesn't contain any elements that satisfies such querySelector

 

I assume this is because my extension must be running before the ‘include’ has occurred. I found this article which indicates how to modify an included fieldset, but I believe this is only for new inclusions, not modifying an existing inclusion. I tried to ‘remove’ and re-add the fieldset, but again, I’d need a valid CSS selector for that.

I also tried an extension of the form-contact-person but I can’t figure out how to use the fieldset ID because it’s a parameter.

Please help!

Best answer by yan

@darylbowman if you want to customize only one screen, namely CR302000, your customization should be applied after qp-includes. Most probably, your problem is caused by the fact that your extension is applied before CR302000_General.html and it doesn’t see tabDetails_Contact because it doesn’t exist at that time.

As long as extensions are applied in the alphabetical order, you just need to rename your extension to be alphabetically after CR302000_General.html, that is something like “CR302000_XXX.html”

And of course make sure that there is no any third extension in between which could remove tabDetails_Contact or move it to some other place.

4 replies

  • Acumatica Employee
  • Answer
  • October 6, 2025

@darylbowman if you want to customize only one screen, namely CR302000, your customization should be applied after qp-includes. Most probably, your problem is caused by the fact that your extension is applied before CR302000_General.html and it doesn’t see tabDetails_Contact because it doesn’t exist at that time.

As long as extensions are applied in the alphabetical order, you just need to rename your extension to be alphabetically after CR302000_General.html, that is something like “CR302000_XXX.html”

And of course make sure that there is no any third extension in between which could remove tabDetails_Contact or move it to some other place.


darylbowman
Captain II
Forum|alt.badge.img+15
  • Author
  • October 6, 2025

rename your extension to be alphabetically after CR302000_General.html

I thought of trying this several times, but I was sure the mechanics of how a screen is compiled would be more complex than this.

This works!


Joe Schmucker
Captain II
Forum|alt.badge.img+3
  • Captain II
  • November 12, 2025

HI ​@darylbowman.  For learning purposes, I’m trying to understand what your issue is and how it was resolved.  I think this scenario will happen to me at some point and if I could see an actual solution, I could use it to reference for my own projects.  I don’t need this for anything I’m doing, but seeing sample code would be helpful. Would you be willing to provide the extension files you created so I can try to understand them? 


darylbowman
Captain II
Forum|alt.badge.img+15
  • Author
  • November 12, 2025

The situation I encountered was trying to customize an extension. The ‘General’ tab of Business Accounts is an extension file in Modern UI. I don’t know why. But when I was trying to modify the extension with my own, I was getting errors that the controls I was referencing didn’t exist. This is apparently because the compile process works in alphabetical order and my extension was alphabetically before ‘CR303000_General’. I had to rename it to be alphabetically after, and then it found the elements I was referencing.