Hello,
I am working on a customization in Acumatica 2025 R2 and trying to display a Google Map side-by-side with a PXGrid in a custom screen.
Scenario-
Custom screen: JobMaint
Tab: "Regions"
Left side: PXGrid (JobRegion)
Right side: Map (should show selected region address)
Goal: When selecting a row in the grid, the map should update and display the address.
What I Have Done-
Created an unbound DAC field MapHtml in JobRegion.
In RowSelected<JobRegion> event, I generate an iframe:
protected virtual void _(Events.RowSelected<JobRegion> e)
{
if (e.Row == null)
return;
string address =
$"{e.Row.AddressLine1}, {e.Row.City}, {e.Row.PostalCode}, {e.Row.CountryID}";
if (string.IsNullOrWhiteSpace(address))
return;
string encoded = Uri.EscapeDataString(address);
string map =
$"<iframe src='https://maps.google.com/maps?q={encoded}&output=embed' " +
$"style='width:100%;height:100%;border:0'></iframe>";
e.Cache.SetValueExt<JobRegion.mapHtml>(e.Row, map);
}
On the ASPX page, I used:
<px:PXFormView
runat="server"
ID="frmRegionMap"
DataSourceID="ds"
DataMember="Regions">
<Template>
<px:PXHtmlView
runat="server"
ID="mapView"
DataField="MapHtml"
Width="100%"
Height="400px" />
</Template>
</px:PXFormView>
Grid has:
SyncPosition="True"
SyncCurrent="True"
Problem-
The map is NOT displaying at all.
No iframe visible.
No JavaScript error.
Console only shows localization warning (404 locale en-US).
Grid selection works.
RowSelected fires (verified in debugger).
Even when hardcoding iframe in ASPX, it does not display.
Questions-
Is PXHtmlView still supported for rendering iframe HTML in 2025 R2?
Is there a security restriction preventing iframe rendering?
Is there a recommended approach in 2025 R2 to show external map content?
Should we use Azure Maps instead of Google Maps?
Is there any CSP or X-Frame-Options restriction blocking embedded maps?
Any guidance or best practice for showing a dynamic map next to a grid in 2025 R2 would be greatly appreciated.
Thank you.
