<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://sugarclub.sugarcrm.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Copy quote make fields editable / update calculated fields</title><link>https://sugarclub.sugarcrm.com/dev-club/f/questions-answers/4936/copy-quote-make-fields-editable-update-calculated-fields</link><description>Hi, 
 for a customer who uses the quotes module a lot we want to be able to copy an existing quote and update the products on the copy with new data from the producttemplate ( they change prices etc on the producttemplate, they don&amp;#39;t create new templates</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Copy quote make fields editable / update calculated fields</title><link>https://sugarclub.sugarcrm.com/thread/24299?ContentTypeID=1</link><pubDate>Mon, 19 Jul 2021 13:11:02 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:3fab141f-f314-4562-8aa7-5fe4085fbca5</guid><dc:creator>Andr&amp;#233; Lopes</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/thubbard"&gt;Travis Hubbard&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In some specific situations, I can not remember exactly which ones, dependencies configured in some fields get lost on adding additional items.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Copy quote make fields editable / update calculated fields</title><link>https://sugarclub.sugarcrm.com/thread/24298?ContentTypeID=1</link><pubDate>Mon, 19 Jul 2021 12:53:08 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:8cc38437-b223-42f8-a405-897a8b8c7d23</guid><dc:creator>Travis Hubbard</dc:creator><description>&lt;p&gt;Hey Andr&amp;eacute; just curious, we run that code during initialize. What changes between initialize and onAddNewItemToGroup that you need to run those again or why did you guys find that fixes the issue?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Copy quote make fields editable / update calculated fields</title><link>https://sugarclub.sugarcrm.com/thread/24296?ContentTypeID=1</link><pubDate>Mon, 19 Jul 2021 12:31:36 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:17b5acb5-3786-4db3-ae9b-ee53c028122a</guid><dc:creator>Andr&amp;#233; Lopes</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/jeroensomhorst21784"&gt;Jeroen Somhorst&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We faced a similar issue at a customer&amp;#39;s instance, maybe our solutions may help you:&lt;/p&gt;
&lt;p&gt;file:&amp;nbsp;custom/modules/ProductBundles/clients/base/views/quote-data-group-list/quote-data-group-list.js, method&amp;nbsp;onAddNewItemToGroup.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Add the lines&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="javascript"&gt;        this.qliListMetadata = app.metadata.getView(&amp;#39;Products&amp;#39;, &amp;#39;quote-data-group-list&amp;#39;);
        this._fields = _.flatten(_.pluck(this.qliListMetadata.panels, &amp;#39;fields&amp;#39;));
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;between variable declarations&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="javascript"&gt;		var relatedModel = app.data.createRelatedBean(this.model, null, linkName);
		var quoteModel = this.context.get(&amp;#39;parentModel&amp;#39;);
		var maxPositionModel;
		var position = 0;
		var $relatedRow;
		var moduleName = linkName === &amp;#39;products&amp;#39; ? &amp;#39;Products&amp;#39; : &amp;#39;ProductBundleNotes&amp;#39;;
		var modelData = {};
		var groupLineNumObj;
		// these quoteModel values will be overwritten if prepopulateData
		// already has currency_id or base_rate already set
		var currencyId = quoteModel.get(&amp;#39;currency_id&amp;#39;);
		var baseRate = quoteModel.get(&amp;#39;base_rate&amp;#39;);
		var newLineNum;
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;and line&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="javascript"&gt;		prepopulateData = prepopulateData || {};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This workaround fix dependencies&amp;nbsp;issues in lines after first one.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Copy quote make fields editable / update calculated fields</title><link>https://sugarclub.sugarcrm.com/thread/24295?ContentTypeID=1</link><pubDate>Mon, 19 Jul 2021 12:26:31 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:12add78f-c957-45bf-9ba6-9a78dcb44b14</guid><dc:creator>Travis Hubbard</dc:creator><description>&lt;p&gt;I vaguely remember running into something like this with Quotes so here might be something to look into. SugarLogic (sidecarExpressionContext.js) has a listener for &amp;#39;&lt;span&gt;list:editrow:fire&amp;#39; and i think in a couple places in Quotes (and Opps/RLI create supanel-list-create.js) we specifically trigger the&amp;nbsp;&amp;#39;list:editrow:fire&amp;#39;&amp;nbsp;event on the context to trigger SugarLogic to run manually. I&amp;#39;ve had hit-or-miss success with that in the past but I think if you can find the right combination of contexts to trigger the event on, and passing in the right model, you may get SL to re-run on the right model to trigger rollups and dependencies. Sorry this isn&amp;#39;t a step-by-step guide but hopefully something there gets you pointed in the right direction.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Copy quote make fields editable / update calculated fields</title><link>https://sugarclub.sugarcrm.com/thread/24288?ContentTypeID=1</link><pubDate>Mon, 19 Jul 2021 06:11:17 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:4f53444c-b036-4b22-a21f-2a730ba7c43c</guid><dc:creator>Jeroen Somhorst</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;thanks for the answer but this does not really answer my questions. I wonder if someone else has found how the various fields in the product bundle list are set readonly. I can&amp;#39;t seem to find a dependency of some sort&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Copy quote make fields editable / update calculated fields</title><link>https://sugarclub.sugarcrm.com/thread/24261?ContentTypeID=1</link><pubDate>Wed, 14 Jul 2021 09:23:26 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:4e2ea384-7f85-4f81-b313-c7cce041ee03</guid><dc:creator>Rolustech Support</dc:creator><description>&lt;p&gt;Hi Jeroen,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regarding your first question:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It is the desired behavior in Sugar. Whenever we added a calculated field in Sugar or modify the existing calculating field then it is the limitation to perform save click action to recalculate it. But this is a time-consuming operation for a large number of records. So you can do the following steps if you are an administrator or have developer-level access:&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;1. Navigate to the Quote&amp;#39;s list view and select those you wish to update.&lt;/div&gt;
&lt;div&gt;2. From the Actions menu, choose to Recalculate Value.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;This will trigger a recalculation of all calculated fields in the selected record.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;For your second question:&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;There is a need to look into the code implementation. Maybe there is some dependency apply to these fields. You can contact my Sugar certified team at &lt;a href="mailto:support@rolustech.com"&gt;support@rolustech.com&lt;/a&gt;&amp;nbsp;for further assistance. You can also check out our &lt;a title="Rolustech SugarCRM e-book" href="https://www.rolustech.com/a-complete-sugarcrm-guide"&gt;SugarCRM e-book&lt;/a&gt; for more insight on your current problem.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Hopefully, this will help you sort out your issue!&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>