updated to amd

updated Query related records sample to AMD style