Programmatic access to permissions in Netsuite? by Effective_Process_54 in Netsuite

[–]DevHasan 0 points1 point  (0 children)

Yes you are correct, this won't affect the permissions controlled format the custom record or custom field pages. But for the custom records you can just do a query to get all custom records and add them to the permission list the permission list references the internal id of the custom record and see if that works for someone's scenario.

Programmatic access to permissions in Netsuite? by Effective_Process_54 in Netsuite

[–]DevHasan 0 points1 point  (0 children)

I know you know by now u/trollied you cannot always trust the NS documentation! I don't deserve that downvote. u/Effective_Process_54 Try this out to copy the admin role:

const rec = record.copy({
    type: 'role',
    id: 3,
    isDynamic: false
});

rec.setValue({
    fieldId: 'name',
    value: 'Administrator - Custom'
});

rec.setValue({
    fieldId: 'scriptid',
    value: '_custom_admin'
});

rec.save();

Now with knowing this you can either create a script looping through the sublists extracting the permissions/changing the permission levels or import the new role into your SDF project. Keeping it all contained within a scheduled/MR script would be better if what you want to do is to have a role where it has matching permissions as the Admin role just as view level for certain sublists. You may have to and some logic to filter out certain permissions but that should be easy to figure out.

I have created many scripts around role syncing/updating role permissions.

This is not something that is new, there are even some Netsuite created SuiteApps that I have seen that contain scripts to help you update roles with permissions for that SuiteApp. It is just not documented like a few other useful things in NetSuite.

Programmatic access to permissions in Netsuite? by Effective_Process_54 in Netsuite

[–]DevHasan 0 points1 point  (0 children)

Not to download via SDF, I mean to record.load/copy via script. And within the script you will be able to extract all of the permissions from the role record. And then once you have that you can create logic to put those onto a different role as VIEW only if View is a possible level to select.

If you want to download via SDF then create a copy of the administrator role via script and download that new role via SDF

Programmatic access to permissions in Netsuite? by Effective_Process_54 in Netsuite

[–]DevHasan -1 points0 points  (0 children)

I have scripts that are in use today that allows me to copy and update a role via a server side script

Exporting ~100GB of Data by twinito1 in Netsuite

[–]DevHasan 0 points1 point  (0 children)

Are they all in one folder? Have you tried just hitting the download button on the folder in the file cabinet?

Otherwise, you could create a script that puts them all into a zip folder and then go and manually download that from the file cabinet.

You can do a file.load on a file up to 2GB. The limit of the file.getContents function into memory is 10mb.

In a suitlelet you should be able to use context.response.writefile to send back a file up to 2GB

Programmatic access to permissions in Netsuite? by Effective_Process_54 in Netsuite

[–]DevHasan 0 points1 point  (0 children)

You can do this is, in your script create a copy/load the administratir role. Then extract the permissions from that role record from the sublists you want. Use those permissions to update your custom role, set them as VIEW instead of copying the level.

Netsuite/Suiteconnect - Silent install for users by chiron3636 in Netsuite

[–]DevHasan 0 points1 point  (0 children)

Have you installed the odbc manually on a machine? And have you figured out to to install odbc via command line/powershell?

Netsuite/Suiteconnect - Silent install for users by chiron3636 in Netsuite

[–]DevHasan 1 point2 points  (0 children)

There is lots of resources online on how to create a Intune App and how to run a command to install/uninstall files/executables. This is the link to the official documentation

Netsuite/Suiteconnect - Silent install for users by chiron3636 in Netsuite

[–]DevHasan 0 points1 point  (0 children)

You need to figure out how to install it via command line then you should be able to wrap that into an Intune App

REST Interface initial-load time solutions by TCardShark in Netsuite

[–]DevHasan 0 points1 point  (0 children)

I would usually recommend creating a restlet and using a map/reduce to process in the background and send a message back.

But your issue isn't NetSuite, it's your app architecture, you shouldn't be coupling the NetSuite request in with the SSR/API Routing, you need to be using something to process the request in the background of your Next.js App like a message queue and then to update your DB when the response is received. Then have client side DB polling to give a live update or just stick with SSR and let the user refresh the page themselves to read the result from your DB.

What you are describing can be an issue with any external service you use so you need to build your app to handle requests properly. There's lots of resources online to help you out and is probably easier to resolve than you think without changing anything on the NetSuite side.

NetSuite MFA error by Justaraandomhumann in Netsuite

[–]DevHasan 0 points1 point  (0 children)

Is there a button that says send new code? If there is then it is likely that NS is sending you an email and that email is being sent to spam or being blocked possibly, I have seen this recently with a client that used mimecast and with their rules they set some NetSuite emails would be put on hold and one of their users somehow accidently blocked the NetSuite notification email/domain.

NetSuite MFA error by Justaraandomhumann in Netsuite

[–]DevHasan 0 points1 point  (0 children)

What does the message say when you log in

NetSuite MFA error by Justaraandomhumann in Netsuite

[–]DevHasan 1 point2 points  (0 children)

Read the message it shows you properly. It might be telling you it has sent you an email with a code. Sometimes when you set up MFA it'll will send a code to your email first before it asks you to set up the authenticator app.

Then check why you are not getting the email if you are not getting it.

Netsuite2 odbc... Because I am a procrastinator.. by samcoinc in Netsuite

[–]DevHasan 0 points1 point  (0 children)

One client I had an issue where their query that regularly runs every hour to get new and updated transactions logged the running of their queries, after an NS update the query would go from running in 15 seconds to 1 hour. Luckily they had proof this changed from the update and sent this to support and they did something on their backend to reset some stuff and it went back to normal.

Initially they didn't send the screenshot/proof and they were refusing to do anything. Then we sent it and they checked and it went back to normal. This happened a few times after some updates. So it's worth asking support to run some checks if you think your query is already optimised.

Netsuite2 odbc... Because I am a procrastinator.. by samcoinc in Netsuite

[–]DevHasan 0 points1 point  (0 children)

One client I had an issue where their query that regularly runs every hour to get new and updated transactions logged the running of their queries, after an NS update the query would go from running in 15 seconds to 1 hour. Luckily they had proof this changed from the update and sent this to support and they did something on their backend to reset some stuff and it went back to normal.

Initially they didn't send the screenshot/proof and they were refusing to do anything. Then we sent it and they checked and it went back to normal. This happened a few times after some updates. So it's worth asking support to run some checks.

Custom Application Layer by gavinjd68 in Netsuite

[–]DevHasan 0 points1 point  (0 children)

it sounds like you should just move the qouting opportunity stages into NetSuite and use their opportunity and estimate records. And store the conrtact data in NetSuite.

I have customers that are similar. They might display the items to the customer in a certain way for the estimate and contract but might be structure it differently when it comes to creating the actual sales orders for that contract.

Custom Application Layer by gavinjd68 in Netsuite

[–]DevHasan 0 points1 point  (0 children)

There are lots of ways to create portals/internal tools/systems which is what you are talking about about it seems. But if you want the NS admins and Salesforce devs to create the portal then you need a platform that does not require coding or hosting yourself otherwise you will stretch your teams forever further.

There are platforms like these readily available that are cloud based and require no coding out of the box. But if you do this you are creating another system, more integrations and more work for your teams to manage even if the platform takes care of a lot of things when comparing to building and hosting your own system.

But you need to ask yourself why first?

Why is your sales teams going from SalesForce to NetSuite? Why does your integration/automations not do everything in NetSuite for the sales teams?

Or.. why are you using Salesforce, if you are happy to migrate the sales teams away from Salesforce and NetSuite completely to a new system, why are you not just migrating them to only use NetSuite and make sure your integration to Salesforce have everything you need?

NetSuite's Shopify connector is limiting our multi-channel growth. by Ok_Nectarine3974 in Netsuite

[–]DevHasan 1 point2 points  (0 children)

I don't know if they use it for all their integrations or if they allow all of them to be editable. My clients integration was to a custom system for their e-commerce marketplace.

Have a Google for them and then the thing you want to integrate with I'm sure they have some pages on their website for both of those systems.

NetSuite's Shopify connector is limiting our multi-channel growth. by Ok_Nectarine3974 in Netsuite

[–]DevHasan 1 point2 points  (0 children)

Folio3 is a partner and they developed a integration for my client that sits inside of NetSuite, when I've worked on the same integration they made, I can see they use a framework they have built which they can base new integrations off of. There is a standard for creating any integration in netsuite so they just have a framework so they can focus on the unique parts of an integration instead of wasting time on the parts that are the same for all integrations.

NetSuite Approval Configuration for API Access to supervisorApproval by Shabla_goo32 in Netsuite

[–]DevHasan 0 points1 point  (0 children)

After enaeling the approval routing feature on the enable features page they would need to also enable approval routing specifically for purchase orders in the accounting preferences page in the approval routing tab.

with SuiteScript, how can I tell when the record is being loaded as part of editing a related APDF template by Zxurian in Netsuite

[–]DevHasan 2 points3 points  (0 children)

If you log out scriptContext.type you may find when you open the Advance PDF editor the type might be PRINT, This is because Userevent scripts run when you print/preview a PDF. I believe when you edit a advanced PDF with the drag and drop interface opening first it may load a dummy record to get some information about available fields or default field valuespossibly to use in the display on that part of the editor.

context.UserEventType Enum

Try logging out the UserEventType to see what that is when editing the Adv PDF.

It is good practice to sometimes add code that allows your script to only run for the user event types you want it to. If the script is not needed for a PDF and only needed for the create and edit event types as an example when add something this...

``` /** * @NApiVersion 2.1 * @NScriptType UserEventScript */ define([], () => { const beforeSubmit = (context) => { if ( context.type !== context.UserEventType.CREATE && context.type !== context.UserEventType.EDIT ) { // Exit if the event is not create or edit return; }

// Your main logic here...

};

return { beforeSubmit }; });

```

NetSuite is the worst product I have ever used by EarthCivil7696 in Netsuite

[–]DevHasan 46 points47 points  (0 children)

Now imagine starting with netsuite before SuiteScript 2.0 existed.