Add readonly external id field when needed

http://manage.dimagi.com/default.asp?147163