Javascript - how to retrieve connection field ID?

I'm sure this is simple but I can't find a method to set a variable to a field connection ID:

var EstimateTemplateID = record.field_207

How do i set EstimateTemplateID to field_207 connection ID?

Marvellous Oliver - thanks a lot.

Maybe this will help: https://gist.github.com/ngalluzzo/8ca62a13fef3d2827901