Skip to content

Commit

Permalink
Don't send updates in option set view for changes in summery rows, this
Browse files Browse the repository at this point in the history
fixes #7
  • Loading branch information
DigitalFlow committed Jan 23, 2017
1 parent 2823170 commit 8be427c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/js/OptionSetHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@
var optionSetValue = parseInt(record.schemaName);
var changes = record.w2ui.changes;

if (!optionSetValue) {
continue;
}

var labels = [];

for (var change in changes) {
Expand Down Expand Up @@ -175,6 +179,12 @@
var records = XrmTranslator.GetGrid().records;
var updates = GetUpdates(records);

if (!updates || updates.length === 0) {
XrmTranslator.LockGrid("Reloading");

return OptionSetHandler.Load();
}

Promise.resolve(updates)
.each(function(payload) {
return WebApiClient.SendRequest("POST", WebApiClient.GetApiUrl() + "UpdateOptionValue", payload);
Expand Down

0 comments on commit 8be427c

Please sign in to comment.