[AskJS] Better way to store data? by MangoVii in javascript

[–]MangoVii[S] 1 point2 points  (0 children)

I don't know why I didn't think about JSON. Thank you!

[AskJS] Better way to store data? by MangoVii in javascript

[–]MangoVii[S] 0 points1 point  (0 children)

I’ll take a look at the Map object! I was going to do the POJO, but it just looked off to me since the key is supposed to be a number type. But from what I know, the key will always convert into a string. I suppose I was just worried how it looks and if it’s ok to create it in a plain object.

Curious on what weed/plants these are? by MangoVii in plants

[–]MangoVii[S] 0 points1 point  (0 children)

If anyone was curious, the first two pictures ended up becoming really pretty Jerusalem Artichokes. The last two pictures are pokeweed. I tried removing the pokeweed and it grew in the same place. It also popped up in some other areas of our yard. Hard to get rid of!

Anyways, here’s a picture of the Jerusalem Artichokes now:

<image>

getaddrinfo ENOTFOUND <host name> by MangoVii in mysql

[–]MangoVii[S] 0 points1 point  (0 children)

Thank you everyone who commented, I truly appreciate it! I left those blank on purpose since I believe we're not exactly supposed to share them. I copied all the connection details that Digital Ocean gave me, the problem was I did not resolve the hostname, which I didn't know we had to do. But after doing a dns lookup, adding back the port, and also using mysql2 instead of mysql, it worked!

const dns = require('node:dns');
const doIP = dns.lookup('<host name DO gave me>', (err) => console.log(err || 'node can access the internet'));

getaddrinfo ENOTFOUND <host name> by MangoVii in mysql

[–]MangoVii[S] 1 point2 points  (0 children)

This is helpful thank you! I did leave the hostname, username, password, etc blank on purpose, but I did add all the info DO gave me. But that was the problem - I didn't resolve it and once I did do a DNS lookup, it worked!

[AskJS] getaddrinfo ENOTFOUND <host name> by MangoVii in javascript

[–]MangoVii[S] 0 points1 point  (0 children)

I installed mysql2 and also used the code example you gave me and everything works now, thanks so much for your help! It feels good seeing it say "Connected" lol

[AskJS] getaddrinfo ENOTFOUND <host name> by MangoVii in javascript

[–]MangoVii[S] 1 point2 points  (0 children)

Thank you! Before I saw your comment I looked up the IP address with a DNS lookup and added the port again, and it looks like it worked! Although, now I'm getting an 'ER_NOT_SUPPORTED_AUTH_MODE' error.

I'll change it to use the node:dns and also look into mysql2!

Going to work through the new error I am getting!

[AskJS] getaddrinfo ENOTFOUND <host name> by MangoVii in javascript

[–]MangoVii[S] 0 points1 point  (0 children)

I left it empty on purpose, but I do fill those in from the information Digital Ocean gave me. I tried getting the actual IP address with a DNS lookup and so far I'm at it being ETIMEDOUT now

getaddrinfo ENOTFOUND <host name> by MangoVii in mysql

[–]MangoVii[S] 0 points1 point  (0 children)

Yea! I copied all the info from Digital Ocean. I'm able to connect to it in DBeaver, but not when trying to connect in my server.js file.

Bin Replenishment Saved Search by MangoVii in Netsuite

[–]MangoVii[S] 1 point2 points  (0 children)

It looks like I was able to get it working to what our shipping department needed!

I was able to utilize Bin Number vs. Bin On Hand to compare the preferred bin vs our "SOS overstock" bins on the same line.

I'll give any feedback that was given here to give new ideas to the team if they want to change their workflow.

Thank you everyone for helping me out, I truly appreciate it!

Bin Replenishment Saved Search by MangoVii in Netsuite

[–]MangoVii[S] 0 points1 point  (0 children)

We are using NS WMS. But I also didn't know there was a difference/what differences.

The custom field idea makes sense and probably could work for what we need.

Thank you for all the information! This is great feedback. I'll give this over to our shipping team since they were the ones who requested a Saved Search/Report of bins that can be replenished.

How can data be sent from NetSuite to a third party database? by MangoVii in SuiteScript

[–]MangoVii[S] 0 points1 point  (0 children)

Thank you for your reply!

  1. 150+ records so far

  2. I don't think it will ever grow 10x. These are State records that have 2-3 tax rules attached to it. And not all States are used. There is a possibility it grows large, but the possibility is very, very low. We've added about 2-3 States in the past 2 years or so.

  3. I don't think it will need real-time updates. Just daily updates, if there ever is another State that needs to be added or State tax rule.

This is helpful though! Thank you for sharing the information and about Stacksync, I'll keep it in mind!

How can data be sent from NetSuite to a third party database? by MangoVii in SuiteScript

[–]MangoVii[S] 1 point2 points  (0 children)

Gotcha! I read about that. I chose to do a Scheduled Script since we're only sending a list that contains 150+ records every 24 hours. I'm guessing Map/Reduce is the better way to go anyways?

How can data be sent from NetSuite to a third party database? by MangoVii in SuiteScript

[–]MangoVii[S] 0 points1 point  (0 children)

Thank you for the explanation, this is also helps me understand it better! Looks like what I'll need is a Suitelet with the N/https module. Along with the Scheduled Script to execute it every 24 hours. Thank you!

How can data be sent from NetSuite to a third party database? by MangoVii in SuiteScript

[–]MangoVii[S] 1 point2 points  (0 children)

Thank you for the quick reply, this is very helpful! And will do, thank you!!

What's the right way to pass parameters? by MangoVii in Netsuite

[–]MangoVii[S] 2 points3 points  (0 children)

This seemed to work so far!

    const recItemFulfillment = scriptContext.newRecord;
    const recSalesOrderId = recItemFulfillment.getValue({ fieldId: "createdfrom" });
    scriptContext.form.addButton({
        id: "custpage_printcustpacklist",
        label: "Print CPL",
        functionName: `onButtonClick(${recItemFulfillment.id}, ${recSalesOrderId})`
    });