cancel
Showing results for 
Search instead for 
Did you mean: 

How can I read association value?

former_member200995
Contributor
0 Kudos

Hi experts,

     I extension productionorder, in Event: AfterModify, I want to read the value:RequestSegmentReference-ProductionRequestProductionSegment-ID.

     But the point(.), like ( this.), can't access it.

     How can I read the value?

     Thanks.

    

Accepted Solutions (0)

Answers (1)

Answers (1)

sunil1101
Advisor
Advisor
0 Kudos

Hi

if you see association RequestSegmentReference cardnality is 1 to many so it will give you collection of records

you can access desired ID as shown in below code Getfirst() will give first record from the collection

import ABSL;

import AP.LogisticsExecution.Global;

var ins1 = ProductionOrder.Retrieve(this.NUUID);

var myID = ins1.RequestSegmentReference.GetFirst().ProductionRequestProductionSegment.ID;

Regards

Sunil

former_member200995
Contributor
0 Kudos

Hi Sunil,

     Could you tell me Which fields is the ProductionRequestID? I test .ProductionRequestProductionSegment.ID is a material.

     Thanks.