To paste custom field value from SOLine to SOShipLine, you should create an extension for the SOShipmentEntry BLC and override the CreateShipmentFromSchedules method as shown in the following sample below:
public class SOShipmentEntry_Extension : PXGraphExtension<PX.Objects.SO.SOShipmentEntry>
{
public delegate bool CreateShipmentFromSchedulesDel(
PXResult<SOShipmentPlan, SOLineSplit, SOLine, InventoryItem, INLotSerClass, INSite, SOShipLine> res,
SOShipLine newline, SOOrderType ordertype, string operation, DocumentList<SOShipment> list);
[PXOverride]
public bool CreateShipmentFromSchedules(
PXResult<SOShipmentPlan, SOLineSplit, SOLine, InventoryItem, INLotSerClass, INSite, SOShipLine> res,
SOShipLine newline, SOOrderType ordertype, string operation, DocumentList<SOShipment> list,
CreateShipmentFromSchedulesDel del)
{
SOLine line = (SOLine)res;
PXFieldDefaulting specialistFieldDefaulting = new PXFieldDefaulting((s, a) =>
{
if (line != null)
{
a.NewValue = line.GetExtension<SOLineExt>().UsrSpecialist;
a.Cancel = true;
}
});
bool result;
Base.FieldDefaulting.AddHandler<SOShipLineExt.usrSpecialist>(specialistFieldDefaulting);
try
{
result = del(res, newline, ordertype, operation, list);
}
finally
{
Base.FieldDefaulting.RemoveHandler<SOShipLineExt.usrSpecialist>(specialistFieldDefaulting);
}
return result;
}
}
This is how a newly created Shipment should look like:
after execution of the Create Shipment action for the Sales Order below:

To paste custom field value to ARTran, you should create an extension for the SOInvoiceEntry BLC and override the CreateTranFromShipLine method.
Because the Prepare Invoice button, found on both the Sales Orders (SO301000) and Shipments (SO302000) screens, can be used to create a new AR Invoice either based on Shipment details or straight from Sales Order details for those orders, which order type does not process shipments (the Process Shipments option is unchecked on the Order Types screen), it's necessary to verify if the current sales order's type process shipments or not. For Order Types, that process shipments, we will paste custom field value from SOShipLine to ARTran. Otherwise, custom field value will be pasted from SOLine to ARTran.
public class SOInvoiceEntry_Extension : PXGraphExtension<PX.Objects.SO.SOInvoiceEntry>
{
public delegate ARTran CreateTranFromShipLineDel(ARInvoice newdoc, SOOrderType ordertype, string operation,
SOLine orderline, ref SOShipLine shipline);
[PXOverride]
public ARTran CreateTranFromShipLine(ARInvoice newdoc, SOOrderType ordertype, string operation,
SOLine orderline, ref SOShipLine shipline, CreateTranFromShipLineDel del)
{
var arTran = del(newdoc, ordertype, operation, orderline, ref shipline);
PXCache<ARTran>.GetExtension<ARTranExt>(arTran).UsrSpecialist = ordertype.RequireShipping == true ?
shipline.GetExtension<SOShipLineExt>().UsrSpecialist :
orderline.GetExtension<SOLineExt>().UsrSpecialist;
return arTran;
}
}
Here is an example of a new AR Invoice:
prepared for the Shipment below:

And this is how a new AR Invoice should look like:
after execution of the Prepare Invoice action for a Sales Order of the Order Type, that does not process shipments:

For an example on how to paste custom field values from the AR Invoice details directly into GL Transactions, please check this answer.