This specifically pertains to the Service Management module of Acumatica. On the Service Orders screen (SD300100) and under the Labor Tab. We would like when a new row is created and a Model Number is selected then the Service ID would automatically be populated based on what model number that is selected.
I have coded this:
protected void FSSODetService_ServiceID_FieldSelecting(PXCache cache, PXFieldSelectingEventArgs e)
{
var service = (FSSODetService)e.Row;
if (service == null) return;
var equipment = (FSEquipment)PXSelect<FSEquipment,
Where<FSEquipment.SMEquipmentID, Equal<Required<FSSODetService.SMEquipmentID>>>>.Select(Base, service.ServiceID);
if (equipment != null)
{
e.ReturnValue = equipment.EquipmentTypeID;
}
}
This is leaving me this error when published.
\App_RuntimeCode\ServiceOrderEntry.cs(54): error CS0118: 'FieldService.ServiceDispatch.FSEquipment.SMEquipmentID' is a 'property' but is used like a 'type'
\App_RuntimeCode\ServiceOrderEntry.cs(54): error CS0118: 'FieldService.ServiceDispatch.FSSODet.SMEquipmentID' is a 'property' but is used like a 'type'
I feel like it has something to do with the setup of the Database values as they are capital in the beginning instead of lowercase. If any one has some knowledge about this, I would greatly appreciate it.