Yes, FWFDAN, what you did sounds correct However, code shares have a nasty surprise if you do not check the fare class. see these links for more information.
UA mileage for *A partner NH:
http://www.united.com/CMS/en-US/mark...spx?ItemId=299
NO Miles on UA code Share:
http://www.flyertalk.com/forum/unite...ode-share.html