Skip to main content
Solved

Error generated in Modern UI editor

  • July 15, 2026
  • 2 replies
  • 45 views

Forum|alt.badge.img+8

My customization file looks like this (the relevant part, I think):

<template>
<field remove="#fsColumnA-Order field[name='CustomerRefNbr']"></field>
<field name="CurrentDocument.ShipVia" after="#fsColumnA-Order field[name='CustomerOrderNbr']"></field>
<field modify="#fsColumnB-Order field[name='OrderDesc']" after="#fsColumnB-Order field[name='ContactID']"></field>
<field remove="#fsColumnB-Order field[name='CuryID']"></field>
<field name="CurrentDocument.UsrOrderAlerts"></field>
<field remove="#fsColumnB-Order field[name='DestinationSiteID']"></field>
<field name="CurrentDocument.CreatedByID_description" after="#fsColumnB-Order field[name='CurrentDocument.UsrOrderAlerts']"></field>

The following error appears on the screen:

Error occured during HTML merge for 'SO301000', original source will be used instead. Error: Error: In HTML extension 'C:\Windows\TEMP\905219b4-17ee-4d7e-b95d-7280dea38245\customizationScreens\MainTenant08\screens\SO\SO301000\extensions\SO301000_CustomerOEMods_generated.html' for screen 'SO301000' child node 'FIELD' has AFTER attribute with '#fsColumnB-Order field[name='CurrentDocument.UsrOrderAlerts']', but screen HTML doesn't contain any elements that satisfies such querySelector

And yet, I can see the field definition for CurrentDocument.UsrOrderAlerts is there. Is it because validation routine doesn’t include fields that have just been added in the same customization?

 

Best answer by tareshpatil51

Hii ​@Django ,  

Yes, this is expected behavior.

The after (and before) selector can only reference elements that exist in the original screen HTML. Since CurrentDocument.UsrOrderAlerts is being added in the same customization, it isn't available as an anchor during the HTML merge.

Instead of:

 
<field name="CurrentDocument.CreatedByID_description"
after="#fsColumnB-Order field[name='CurrentDocument.UsrOrderAlerts']"/>

anchor it to an existing field, for example:

 
<field name="CurrentDocument.UsrOrderAlerts"
after="#fsColumnB-Order field[name='ContactID']"/>

<field name="CurrentDocument.CreatedByID_description"
after="#fsColumnB-Order field[name='ContactID']"/>

So yes, your assumption is correct—the merge engine does not allow newly added fields in the same customization to be used as after/before targets.  

Try this way and let me know if u required anything else.

2 replies

Forum|alt.badge.img
  • Varsity I
  • Answer
  • July 16, 2026

Hii ​@Django ,  

Yes, this is expected behavior.

The after (and before) selector can only reference elements that exist in the original screen HTML. Since CurrentDocument.UsrOrderAlerts is being added in the same customization, it isn't available as an anchor during the HTML merge.

Instead of:

 
<field name="CurrentDocument.CreatedByID_description"
after="#fsColumnB-Order field[name='CurrentDocument.UsrOrderAlerts']"/>

anchor it to an existing field, for example:

 
<field name="CurrentDocument.UsrOrderAlerts"
after="#fsColumnB-Order field[name='ContactID']"/>

<field name="CurrentDocument.CreatedByID_description"
after="#fsColumnB-Order field[name='ContactID']"/>

So yes, your assumption is correct—the merge engine does not allow newly added fields in the same customization to be used as after/before targets.  

Try this way and let me know if u required anything else.


Forum|alt.badge.img

My customization file looks like this (the relevant part, I think):

<template>
<field remove="#fsColumnA-Order field[name='CustomerRefNbr']"></field>
<field name="CurrentDocument.ShipVia" after="#fsColumnA-Order field[name='CustomerOrderNbr']"></field>
<field modify="#fsColumnB-Order field[name='OrderDesc']" after="#fsColumnB-Order field[name='ContactID']"></field>
<field remove="#fsColumnB-Order field[name='CuryID']"></field>
<field name="CurrentDocument.UsrOrderAlerts"></field>
<field remove="#fsColumnB-Order field[name='DestinationSiteID']"></field>
<field name="CurrentDocument.CreatedByID_description" after="#fsColumnB-Order field[name='CurrentDocument.UsrOrderAlerts']"></field>

The following error appears on the screen:

Error occured during HTML merge for 'SO301000', original source will be used instead. Error: Error: In HTML extension 'C:\Windows\TEMP\905219b4-17ee-4d7e-b95d-7280dea38245\customizationScreens\MainTenant08\screens\SO\SO301000\extensions\SO301000_CustomerOEMods_generated.html' for screen 'SO301000' child node 'FIELD' has AFTER attribute with '#fsColumnB-Order field[name='CurrentDocument.UsrOrderAlerts']', but screen HTML doesn't contain any elements that satisfies such querySelector

And yet, I can see the field definition for CurrentDocument.UsrOrderAlerts is there. Is it because validation routine doesn’t include fields that have just been added in the same customization?

 

@Django
 Yes, that's correct for Acumatica's modern UI screen customization model. In the modern UI, customization uses a declarative merge/patch approach against the screen's existing rendered markup, and after= / before= are anchor selectors that tell the engine where to inject your custom content.

The error occurs because:

  • after= and before= selectors must match elements that already exist in the original screen HTML.
  • They cannot reference fields you're adding in the same template.
  • Use an existing field (such as ContactID, OrderDesc, or another base field) as the anchor instead.