Skip to main content

We created a custom skuid opportunity page to replace the salesforce default opportunity page. On the default salesforce page opportunity when opportunity line items are added the amount field on the opportunity uses the amount off the opportunity line item and locks it so users can’t update the amount field. On the skuid opportunity page we added amount however it is not getting locked when opportunity line items are being added. 

Shane, how was the amount field being locked before? Apex trigger?


It’s standard functionality:

https://success.salesforce.com/answers?id=90630000000hdqQAAQ


Shane~

I have been able to reproduce the error you are seeing. I have alerted our developers of this and this will be fixed on a future release. We will let you know when the fix is available.

Thanks for reporting this issue to us to help make Skuid a better product!!!
Karen


Shane~

Here is a workaround if you are using the Amount field in a Field Editor (versus using it in a table which would be much more difficult to implement this on your own.

For a Field Editor, it would be easy to implement this at a per-page level using Conditional Rendering. The approach is this:

1. Have either a Model or Child Relationship to pull in the Line Items for an Opportunity. If you’re not using the Line Items in the page any other way, limit the Model / Child Relationship to just get 1 row, since you only need to know if there’s 1 row to determine how to Conditionally Render the Amount field.

2. Add the Amount field twice to a Field Editor, a Read-Only and a non-Read-Only version. Add Conditional Rendering to the Fields based on whether your Line Items model has data rows, or based on whether the Child Relationship has rows (the Child Relationship-based Conditional Rendering is trickier, but can be done with a Ui-Only Formula Field e.g. “HasLineItems__ui” using a formula like this IF({{OpportunityLineItems.totalSize}}==0,false,true)

Hope that helps …
Karen


Reply