Skip to main content
Nintex Community Menu Bar
Question

Is it possible for a snippet to retrieve quote line items from quote?

  • July 9, 2024
  • 3 replies
  • 2 views
  • Translate

Forum|alt.badge.img+2

Is it possible to write a snippet to retrieve quote line items from a quote? The page contains
only Quote Model and a related task table. I would like to copy all quote line item details into a new task description field?

Did this topic help you find an answer to your question?

3 replies

Forum|alt.badge.img+2
  • Author
  • 6 replies
  • July 9, 2024

Guys, I figured this out and was able to accomplish this using the ChildRelationship tutorial.
I am yet to see what Skuid cannot accomplish. Great work guys.

I am attaching the code just for others help.

var field = arguments[0],
        value = arguments[1];

    var quoteId = skuid.page.params.QuoteId;
    var quoteModel = skuid.model.getModel(‘QuoteData’);
    var quote = quoteModel.getRowById(quoteId);
   
    var dt = field.metadata.displaytype;
    if (field.mode != ‘edit’) {
        skuid.ui.fieldRenderers[dt]field.mode;
    } else {
        skuid.ui.fieldRenderers[dt].edit(field,value);
    }
   
    var tmpDesc = ‘’;
    for(i=0;i<quote.QuoteLineItems.totalSize;i++)
    {
        var qli = quote.QuoteLineItems.records[i];
        tmpDesc = tmpDesc + qli.Description + ’
’ + qli.Quantity + ’
’ + qli.UnitPrice + ’
’ + qli.TotalPrice + ’

';
    }
    if(value==null){
      field.model.updateRow(field.row,‘Description’,tmpDesc);
     
      if(field.mode==‘edit’)
      field.element.find(‘input’).val(tmpDesc);
    }

Translate

Forum|alt.badge.img+17
  • Nintex Employee
  • 3763 replies
  • July 9, 2024

Glad we were able to help.   I was also going to point you to a tutorial where we mass create statements for every contact on an account.  This pulls all the contacts (Children of the account) and creates new statements records for each one.   Lots of concepts are the same:  http://help.skuidify.com/s/tutorials/m/components/l/109496-mass-create-records

Here is shameless request.  We’d love it if you’d copy your second line above as a  review on the app exchange…  Here is the link: https://appexchange.salesforce.com/listingDetail?listingId=a0N30000009wyDjEAI 

Thanks again!

Translate

Forum|alt.badge.img+2
  • Author
  • 6 replies
  • July 9, 2024

Will definitely post a review as soon as we complete few more pending items in our list
and purchase Skuid Licenses :-)  The only other support of this kind is Rackspace’s Fanatic Support,

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings