!--startfragment>
Scenario
We have two screens: the Case screen and the Service Order screen. The goal is to carry over specific field values—Unit and Property—from the Case screen to the Service Order screen.
On the Case screen, these fields are implemented as selectors. When a user clicks either the “Create Service Order” or “View Service Order” action, the Service Order screen opens.
To reflect the same data in the Service Order screen, we’ve added corresponding fields for Unit and Property as read-only text boxes. However, these fields are currently not displaying the values as expected.
I suspect we’re close, but something—likely a missing linkage or binding—is preventing the data from flowing properly (I am new to Acumatica). Here's the code I've implemented so far. Can anyone help me here ?
!--endfragment>
public class FSServiceOrderExt : PXCacheExtension<PX.Objects.FS.FSServiceOrder>
{
#region UsrUnitID
[PXString(255)]
[PXUIField(DisplayName = "Unit", Visibility = PXUIVisibility.SelectorVisible)]
[PXDBScalar(typeof(
Search<Asset.name,
Where<UnitAsset.unitid, Equal<CaseExt.usrUnitID>,
And<Case.caseCD, Equal<Current<ServiceOrder.sourceRefNbr>>>>,
OrderBy<Asc<UnitAsset.name>>>
))]
public virtual string UsrUnitID { get; set; }
public abstract class usrUnitID : PX.Data.BQL.BqlString.Field<usrUnitID> { }
#endregion
#region UsrAssetID
[PXString(255)]
[PXUIField(DisplayName = "Property", Visibility = PXUIVisibility.SelectorVisible)]
[PXDBScalar(typeof(
Search<UnitAsset.assetID,
Where<UnitAsset.assetCD, Equal<CaseExt.usrAssetID>,
And<Case.caseCD, Equal<Current<ServiceOrder.sourceRefNbr>>>>,
OrderBy<Asc<UnitAsset.assetCD>>>
))]
public virtual string UsrAssetID { get; set; }
public abstract class usrAssetID : PX.Data.BQL.BqlString.Field<usrAssetID> { }
#endregion
}
