Hey folks ! This post will explain how you can easily add more case module fields to advanced open portal while creating a new case.

We are not going to discuss here how to connect the AOP to suitecrm and vice versa as this should be already done before reaching this point.

  1. First file to be modified is –
    root/components/com_advancedopenportal/views/newcase/tmpl/default.php

    • Add field in the form like the already existing fields with the name you wish.
    • Also add label accordingly.
    • For select fields copy code from other drop-down fields and modify as per your need. For any other custom field let me know in the comments so I can help you out.
  2. 2nd file is root/components/com_advancedopenportal/controller.php
    • In the function newcase() get the field in a variable using this syntax – $subject = JRequest::getVar(“subject”);
    • Pass the field to this function – $casesConnection->newCase() There will be other fields already being passed to this function.
  3. 3rd file is components/com_advancedopenportal/models/SugarCasesConnection.php
    • Add the field with same name as suitecrm in this array – $case_fields
    • For dropdowns add a function similar to – getPriorities()
    • Edit function newCase() and add the new field which you sent from controller in the function call.
    • After this add same field in the data array using the same name as suitecrm field. So that this field will be sent to suitecrm. Rest of the mapping will be handled automatically.

After this just test by creating a new case. Leave a comment if you face any issues.