Lawyers warned to uphold ‘duty of candour’ in court