Hi Roger,
I have just tried this out in my sports2000 environment.
DEFINE {&ACCESS} DATASET dsOrder{&SUFFIX} {&REFERENCE-ONLY} FOR eOrder{&SUFFIX}, eCustomer{&SUFFIX}, eOrderLine{&SUFFIX}, eItem{&SUFFIX}, eSalesrep{&SUFFIX}
DATA-RELATION eOrdereCustomerRelation FOR eOrder{&SUFFIX}, eCustomer{&SUFFIX}
RELATION-FIELDS (CustNum,CustNum)
DATA-RELATION eOrdereOrderLineRelation FOR eOrder{&SUFFIX}, eOrderLine{&SUFFIX}
RELATION-FIELDS (Ordernum,Ordernum)
DATA-RELATION eOrdereSalesrepRelation FOR eOrder{&SUFFIX}, eSalesrep{&SUFFIX}
RELATION-FIELDS (SalesRep,SalesRep)
DATA-RELATION eOrderLineeItemRelation FOR eOrderLine{&SUFFIX}, eItem{&SUFFIX}
RELATION-FIELDS (Itemnum,Itemnum)
and
@RestAddress (type="record", address="/Customers/~{CustNum}/Orders/~{OrderNum}/OrderLines/~{LineNum}", tables="eOrderLine,eItem", id="LineNum",
fields="*", canRead="true", canUpdate="true", canDelete="true").
Using the SwaggerEntities interface I can GET https://sfrbo.consultingwerkcloud.com:8821/web/Entities/Customers/50010/Orders/175035/OrderLines/2
and PUT https://sfrbo.consultingwerkcloud.com:8821/web/Entities/Customers/50010/Orders/175035/OrderLines/2
with this payload:
{
"Ordernum": 175035,
"Linenum": 2,
"Itemnum": 54,
"Price": 4.86,
"Qty": 13,
"Discount": 20,
"ExtendedPrice": 46.66,
"OrderLineStatus": "Ordered"
}
This successfully updates the Order line for me.
I don't see why FetchRelatedRecords would not work in RESTful. Can you please write the contents of the ePhyLine record within the FOR EACH to the AppServer's logfile:
Consultingwerk.Util.LogManager:WriteBuffer (BUFFER ePhyLine:HANDLE, FALSE) .
Also, is there any stack trace with the error message from the initial post?