This message was deleted.
# general
s
This message was deleted.
p
Hi, I’d approach this with a SuiteScript 2.1 Map/Reduce: • Design: Use getInputData() with SuiteQL/Saved Search to filter qualifying Sales Orders, then process each order in Map and compare the customer’s credit limit against their current balance. • Code: Use search.lookupFields() for the required customer fields and record.submitFields() to update custbody_credit_review_required, with per-record error handling and logging. • Governance: Avoid full record loads, retrieve only required fields, leverage Map/Reduce yielding/concurrency, and isolate failures so one record doesn't stop processing. • Large volumes: Minimize repeated customer lookups, optimize the input query, keep the result payload small, and tune Map/Reduce concurrency for 100K+ records. • Assumptions: Standard creditlimit and balance fields are used, the custom checkbox already exists, and the 30-day period is based on creation date. @David Khaikin
m
What is this?
This looks like a spam.
p
I don’t understand. Who did he say is spamming? Me Or who exactly is he referring to?
@David Khaikin Do you receive my message?
Alright let me know what you think @David Khaikin?
m
An admin should look at this.
💯 2
r
Would need to understand the context behind creating that checkbox. I would rather avoid updating the sales order. Just build a query so you can see all the scenarios live, with just a button click. And a UE which also uses the same query but for that individual sales order, and the same msg will get displayed in before load so end users can see. If updating that checkbox is truly required then a MR is the way to go. Calculate in query if the sales order checkbox needs to be updated, update in map. Query and logic to update will depend on whether you would want that field to default to true or false. So we are only updating the checkbox as true or updating the as false depending upon how the field default is set. P.s. not looking for a gig from you. Just wanted to provide you my thoughts.
a
There are many people here with a lot of experience that can build a very reliable solution for your specifications or requirements but the people here with good experience are precisely the people that do not need to prove their experience to anyone and would not reply to a “challenge” that is not a “challenge” at all. This is basic SuiteScript to solve a basic business problem, nothing “interesting” or “challenging” here. BTW: Careful with the assumption that loading a record is always bad; using
submitFields
with the Sales Order record here could have unintended consequences if the Sales Order’s UserEvents scripts do not handle XEDIT events properly.
👍 1
➕ 1
👍🏻 1
r
There are better ways to ask for free consulting than to frame it as some challenge to a group of people who likely know way more than you. If you truly have a position to fill and are not just fishing for a free solution to some problem at your company, go post this challenge to #jobs.
💯 6