I created some database triggers that update a read only custom field that is displayed on the main contacts page. You change the value in another field and the db triggers update the custom field.
So how do I get that read only field to be refreshed with the new value or, at the very least, just refresh the entire page?
The civicrm ajax wiki page suggests CRM.refreshParent so I tried to put that in a post processing hook
function ccas_hooks_civicrm_postProcess($formName, &$form){
if ( $formName == 'CRM_Contact_Form_Contact' or $formName ==
'CRM_Contact_Form_Inline_CustomData') {
CRM.refreshParent;}
}
Of course, that didn't work. I ended up with following two error messages
Notice: Use of undefined constant CRM - assumed 'CRM' in ccas_hooks_civicrm_postProcess() (line 300 of ...
Notice: Use of undefined constant refreshParent - assumed 'refreshParent' in ccas_hooks_civicrm_postProcess() (line 300...
CRM.refreshParent
is a javascript function.