<div dir="ltr"><div style>I don't know why I didn't think of this earlier, but it certainly is handy to be able to grab arbitrary entity data as JSON.  The only thing I've noticed is that dates come out with the back end format, so I've been casing those out with DateTimeField::convertToUserFormat.</div>
<div><br></div><div><?php</div><div>global $module, $record;</div><div>if ($record && isPermitted($module, 'DetailView', $record) == 'yes') {</div><div><span class="" style="white-space:pre">        </span>$focus = CRMEntity::getInstance($module);</div>
<div><span class="" style="white-space:pre">    </span>$focus->retrieve_entity_info($record, $module);</div><div><span class="" style="white-space:pre"> </span>header("Content-type: text/javascript");<br></div><div>
<span class="" style="white-space:pre">       </span>echo json_encode($focus->column_fields);</div><div>}</div><div><br></div></div>