Get MessageId from Javascript

Not applicable

Is it possible to retrieve the messageId using JavaScript policy?

Thanks in advance

2 3 597
3 REPLIES 3

hi @Deepa, yes it is possible!

....
var messageid = context.getVariable("messageid");
....

please refer this page for scope of this messageid variable - http://docs.apigee.com/api-services/reference/variables-reference

I did do this...but null was returned...Using this in a JavaScript policy that is called from a Conditional FLow

@Deepa possibly then your flow does not match condition and does not allow JavaScript to be executed, can you share screen shot of the trace?