You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Issue while Extending from a standard model

Received Response
31
Views
1
Comments
edited Jun 7, 2022 12:57PM in General Technical Discussions 1 comment

Content

I want to override the function "addContactInformation" in Report Model, I extended Report Model but i couldn't call this extended one, the widget is calling the Standard "ReportModel".

Please find the code for the  model and extenstion.yml

Model :

<?php
namespace Custom\Models;

\RightNow\Models\Base::loadModel('Report');


class ReportAgent extends \RightNow\Models\Report
{

    function __construct()
    {
        parent::__construct();
    }


     function addContactInformation($contactDataSet, $searchArgs, $index = 0)
    {
        
        return $searchArgs;    
    }
      
     

}

 

Extenstion.yml :

modelExtensions:

     Report: ReportAgent

 

Version

CP 3

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!