Hello all, how can I delete a customtool object? I...
# ai-netsuite
k
Hello all, how can I delete a customtool object? I prematurely deployed my MCP suite project (to sandbox) and now i want to delete my script files, but they are dependent on the objects I assume, but i can't find where to delete them in the UI. Has anyone run into this?
g
If I recall that was still an open question.
k
ah ok, thanks tho!
m
Set
exposeto3rdpartyagents
to
F
in your custom tool SDF object, like this:
<exposeto3rdpartyagents>F</exposeto3rdpartyagents>
Then redeploy the tool so it’s not available in your MCP client (e.g., Claude).
1
p
Custom objects deployed through SuiteCloud projects need to be managed through the project itself. To remove them you update the project by deleting those objects from your source and redeploying which will uninstall them from the account.
k
i tried that, i even deleted all my script files and objects and redeployed, but the script files are still present in the file cabinet, and i can not delete them in the UI either
p
SuiteCloud project deployment will remove custom objects but script files in the File Cabinet are not automatically deleted when you redeploy.
To clean those up you either need to mark them as <delete> in the deploy.xml of your project or manually remove them from the File Cabinet if they are no longer referenced. If the UI won’t let you delete them, check whether the files are still linked to a script deployment or object and break that dependency first before retrying.
k
so i never made script records or script deployments. but the MCP connection still ran the scripts when i did test it via claude. so i can't think of any other record that would be referencing the files other than the objects as the objects reference the files with the <scriptfile> tag. i have deleted all files and objects from my project, and redeployed but even after doing so, i cannot delete the script files from the file cabinet. The are still being referenced somewhere
p
When SuiteCloud pushes a <scriptfile> tag the system treats that as a dependency and keeps a hidden reference to it until you explicitly tell the deployment to remove it. The way to clear them out is to add the files back into your project and then mark them with a <delete> action in your deploy.xml, then redeploy. That signals NetSuite to unregister the reference and allow the files to be removed from the File Cabinet. If you just drop them from the project without the <delete> tag the references remain and the UI won’t let you delete them.
k
got it let me try that!
🙌 1
i'm having trouble finding documentation for the <delete> tag and how to use it, how should it be structured?
p
In your
deploy.xml
, you wrap the object or file entry with a
<delete>true</delete>
flag.
<object type="file" path="SuiteScripts/yourScript.js"> <delete>true</delete> </object>
k
i got this error: The object tag is not supported in SDF projects. Remove the object tag to deploy the project. i'm reading that projecttype="ACCOUNTCUSTOMIZATION" cannot delete files https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_1505834545.html#subsect_1522153967