Exclude comment log from Quote copy

Hi, DevClub, 

We are currently using SugarCRM Version 14.0.1 (Build 279) (Q2 2024) on Prem. 

We use the Copy feature within the Quotes module. I'm currently using "custom\Extension\modules\Quotes\Ext\Vardefs\copyPrefill.php" to exclude fields from being copied to the new Quote. e.g.

$dictionary['Quote']['fields']['quote_stage']['duplicate_on_record_copy'] = 'no';
$dictionary['Quote']['fields']['date_quote_closed']['duplicate_on_record_copy'] = 'no';
I would like to also restrict the copying of the Comments log to the new Quote. 

Does anyone know if we still use the CopyPrefill.php file, if so, what is the correct field name to add to the copyPrefill.php file. 
Or is there another method?
Many thanks for your help. 
Parents
  • Hello  , 

    Thanks for sharing this question!

    By default, the Quotes module doesn’t include a “comment log” field, so you’ll need to confirm the exact field name in your Quote vardefs.

    That said, following approach that you shared should work.

    I tested it locally using the Cases module, and adding this file successfully prevented the commentlog field from being copied to a new record:

    custom/Extension/modules/Cases/Ext/Vardefs/copyPrefill.php


    <?php
    $dictionary['Case']['fields']['commentlog']['duplicate_on_record_copy'] = 'no';
    


    You can try a similar approach to see if it works in your case.
    If it doesn’t, it might be because your “comment log” field has a different name.

    In that case, you should be able to find the field name in the aggregation file for your custom vardefs:

    custom/modules/Quotes/Ext/Vardefs/vardefs.ext.php

    Let me know if this helps!

    Cheers,

    André

  • Perfect, this is the correct setting for copyPrefill.php 

    Thanks again.

Reply Children
No Data