2

I have a custom report generated for viewing some contact data and I would like to include a link to send the user to an edit form for a single multi-value custom field record. I would then use civicrmDestination to send them back to the report. I have tried various formats copied from links in the CiviCRM interface. None seem to work. The closest format was this but there is an issue with the "&cgcount" parameter. It seems to always force editing the first record. Is there a way to ignore this and just used the multivalued set record id which is 60159 in my example below?

/civicrm/contact/view/cd/edit?reset=1&type=Organization&groupID=11&entityID=92&cgcount=1&multiRecordDisplay=single&mode=edit&fsId=60159

Ideally I would also like to include a link to create a new custom value record for the row's related contact.

Alternately I would be happy to use JavaScript to create a popup form to edit these records. I am not sure what format to use for that either.

1 Answer 1

2

You're on the right track. If you go to the contact summary page and click the popup links to add/edit custom data then you can re-use those exact links in your report. Give the <a> a class of crm-popup and Civi's js will do the rest for you. No need to redirect back to the report, you can make it refresh automatically via ajax when the popup form is saved by using the CRM.refreshParent method similar to crm.livepage.js

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.