Skip to main content

I have field CustPORefNbr on my Service Orders screen that I wish to display on any Appointments spawned from the parent Service Order. I have created a custom field (UsrCustPORefNbr) on the Appointments screen that I wish to fill with the value from the parent Service Orders CustPORefNbr.

It’s a read-only field on the Appointments screen; I don’t need it to update the database. It’s fine with me if it pulls the value from the Service Orders screen (DAC) every time the Appointment is displayed.

I tried the following, but it caused my server to reboot endlessly:

 

The perpetual reboots happened on both my development and production servers.

Anybody got another suggestion, or know what I did wrong? Thanks much.

@davidpoole21 Do not use PXUnboundDefault attribute for bound fields, instead, use PXDefault attribute.

In your case, if you want a custom bound field in FSAppointment, you would need also to add a logic in ServiceOrderEntry maybe in FieldUpdated_CustPORefNbr to update the custom field (FSAppointmentExt.UsrCustPORefNbr) in all existing appointments associated to this customer when this value is updated from the Service Order screen.

However, depending on the use of this custom field, you wouldn’t need to create it, i.e., if you only need to display this value (FSServiceOrder.CustPORefNbr) in the Appointment screen, you could add it in the header of the App screen taking the value directly from FSServiceOrder.CustPORefNbr. There’s already a region in the header where some fields from Service Order are displayed. (Check Branch Location field)

If you still need this field in FSAppointment, another option for you would be to have an unbound field in Appointment screen and forget about adding logic in Service order screen to update this field. In this case I suggest to define the attributes as follows:
 

 

Notice this field is defined as unbound (PXString) and PXDefault with PersistingCheck = Nothing + PXDBScalar set and keep the value respectively of this unbound field at all time.


Reply