Hi Jialin, The method has the return type as Void, this cannot be returned.
@Sukrut, I am trying the same with the delegate, but I still get the error.
[SubscribesTo(classStr(PurchTable2LineField), delegateStr(PurchTable2LineField, getFieldDescriptionDelegate))]
public static void PurchTable2LineField_getFieldDescriptionDelegateDIS(FieldId _fieldId, EventHandlerResult _result)
{
switch (_fieldId)
{
case fieldNum(PurchTable, ShippingDate_DIS) :
_result.result(fieldId2PName(tableNum(PurchLine),fieldNum(PurchLine,ShippingDate_DIS)));
break;
case fieldNum(PurchTable, ConfirmedShippingDate_DIS) :
_result.result(fieldId2PName(tableNum(PurchLine),fieldNum(PurchLine,ConfirmedShippingDate_DIS)));
break;
}
}
Similar code can be found in ITMPurchTable2LineFieldClassEventHandler class in InboundTransportationManagement model. If I comment out my code, the same error is thrown from the ITM code. Also ITM class is an internal class, unable to hook or wrap around it as well. Should I check with MS? Any help will be appreciated.