Possible createRow bug on 11.1.1 creating duplicates.

edited February 2018 in Problems
I have a snippet that creates new rows through a mass action. Since upgrading to 11.1.1, the snippet creates the first record twice and I cannot seem to find a way around it. This was happening with two models on the snippet so I commented out one and added it separately as it's own action but we need to have rows that are created from selected table items. Is this a bug or am I doing something incorrectly?

Snippet below:
var params = arguments[0],
$ = skuid.$;

var table = skuid.$C('sk-3-w0AD-637');
var list = table.element.data('object').list; 
var selectedItems = list.getSelectedItems();
var newQuote = skuid.$M('NewQuote');
var quoteLines = skuid.$M('NewQuoteLineItems');


//create a new quote

$.each(selectedItems, function(){
   var row = this.row;
  createNewRows(row.Id, row.Product2Id, row.Quantity, row.UnitPrice, row.ServiceDate, row.PricebookEntryId);

function createNewRows(id, product, quantity, salesprice, startdate, pricebookentry){
                {field:'QuoteId', value: newQuote.data[0].Id},
                {field:'Product2Id', value: product},
                {field:'Quantity', value: quantity},
                {field:'UnitPrice', value: salesprice},
                {field:'ServiceDate', value: startdate},
                {field:'PricebookEntryId', value: pricebookentry},
                {field:'OpportunityLineItemId', value: id}
                ], editModeForNewItems: true,
    doAppend: true


var wizard = $('.nx-wizard').data('object'); 
var currentStep = wizard.steps[wizard.currentstep];


  • edited February 2018
    If anyone else is facing this issue, as a temporary workaround I am abandoning the first row at the end of my snippet:
    quoteLines.abandonRow(quoteLines.getFirstRow() );
Sign In or Register to comment.