I'm trying this simple statement and getting null
, shouldn't this be returning 1
since its a master-detail relationship? I've tried at API V40,41,42. Is my syntax wrong?
Here's the relevant documentation on DescribeFieldResult
.
Anonymous script yielding null:
System.debug('relationshipOrder : ' + OpportunityLineItem.OpportunityId.getDescribe().getRelationshipOrder());
EDIT: My previous example was an attempt to make it more generic since not everyone has Work Orders enabled, my actual issue was with WorkOrderId on WorkOrderLineItem which is a MD relationship) also returning null.
https://i.sstatic.net/VuHYF.jpg (screenshot of relationship)
WorkOrderLineItem.WorkOrderId.getDescribe().getRelationshipOrder()