Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Inline Snippet field renderer for the Quantity field on OpportunityLineItem object. Forces a concurrent update of the UnitPrice/SalesPrice field whenever Quantity is updated.
var field = arguments[0],
value = arguments[1];
if (field.mode == 'read') {
skuid.ui.fieldRenderers.DOUBLE.read(field,value);
} else {
skuid.ui.fieldRenderers.DOUBLE.edit(field,value);
skuid.utils.delayInputCallback(
field.element.find('input'),
function(newValue) {
// Force updates of the UnitPrice (Sales Price) field
field.model.updateRow(
field.row,
'UnitPrice',
field.model.getFieldValue(field.row,'UnitPrice')
);
}
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.