Quoted Line Items Audit Log

Dear Sugar Community, 

I'm trying to enable Auditing on Quoted Line Items. i.e. I want to see a list of changes made to the QLIs when a user updates, for example, quantity, amounts etc.

I have turned on the Audit Flag on several QLI fields.   E.g. 

However, when I check to see the Audit log of the QLI, there is no option available.

I understand that the QLI module is an "Auditable Module" as I can see the Activity Stream in the List view of the Quoted Line Items. Has anyone else experienced this issue?

SugarCRM Version 11.0.0 (Build 238 P) (Q2 2021)

Professional.

Thanks for your assistance. 

  • In the  buttons list of the Products record view metadata there is no code for the Auditlog button.

    Hava a look to modules/Products(clients/base/views/record/record.php, the code is missing.

    So you can copy the OOTB metadataf ile record.php to custom/modules/Products/clients/base/views/record/record.php and add the code for the audit button:

                    array(
                        'type' => 'rowaction',
                        'event' => 'button:audit_button:click',
                        'name' => 'audit_button',
                        'label' => 'LNK_VIEW_CHANGE_LOG',
                        'acl_action' => 'view',
                    ),
    

    or you write a piece of extension code to custom/Extension/modules/Products/Ext/clients/base/views/record/add_audit_button.php 

    <?php
    
    foreach ($viewdefs['Products']['base']['view']['record']['buttons'] as $idx => $button){
    	if ($button['type']=='actiondropdown'){
    		$viewdefs['Products']['base']['view']['record']['buttons'][$idx]['buttons'][]=
            array(
                'type' => 'rowaction',
                'event' => 'button:audit_button:click',
                'name' => 'audit_button',
                'label' => 'LNK_VIEW_CHANGE_LOG',
                'acl_action' => 'view',
            );
    	}
    }
    

    QR&R and voilá:

    Harald Kuske
    Principal Solution Architect – Professional Services, EMEA
    hkuske@sugarcrm.com
    SugarCRM Deutschland GmbH

  • Hello Peter

    QLI Audit Log is available OOTB in Sell/Ent and, I believe, in Pro too.

    If your Pro instance is hosted in Sugar Cloud, I would suggest checking with support whether the code for it is actually in place / absent for a reason or smth like customizations prevent Audit Log from showing itself

    Best Regards,
    Dmytro Chupylka

    integroscrm.com
    We make work in Sugar CRM system faster, more convenient and efficient

  • Thanks for your help Harald, it pointed me in the right direction. I noticed that the OOTB modules/Products/clients/base/views/record/record.php file already contained the array for the Audit button, for some reason it was not adding it to the drop down list. 

    I then copied the button array into "custom/modules/Products/clients/base/views/record/record.php". Ran a QR&R and the button was available. 

    I also tested your extension code and it gave me a second button. 

    Thanks again for your assistance. 

  • Hi Dmytro, 

    I think that you are right, but for some reason the button was not displaying although it was in the OOTB modules/Products/clients/base/views/record/record.php file, once added to the "custom/modules/Products/clients/base/views/record/record.php". Ran a QR&R and the button was available. 

    My instance is an on-premise instance. Thanks for your assistance.