Is anybody aware if there is a bug in Netsuite or ...
# suitescript
b
Is anybody aware if there is a bug in Netsuite or if it's a documentation error for scripting Departments? I have a custom field on
department
that I want to run a script on, but the Script Deployment isn't accepting
department
or
-102
for
recordtype
and it's not available in the UI either. None of the "Classifications" appear to be there but they are all there in the documentation as fully scriptable. (https://4581056-sb1.app.netsuite.com/app/help/helpcenter.nl?fid=chapter_n3170023.html). So which is wrong? Netsuite's Script Deployments or the documentation? lol
j
Have you tried using the ENUM value? record.Type.DEPARTMENT
b
Copy code
<scriptdeployments>
    <scriptdeployment scriptid="customdeploydept_color_code">
      <allemployees>F</allemployees>
      <allpartners>F</allpartners>
      <allroles>F</allroles>
      <audslctrole></audslctrole>
      <eventtype></eventtype>
      <isdeployed>T</isdeployed>
      <loglevel>DEBUG</loglevel>
      <recordtype>record.Type.DEPARTMENT</recordtype>
      <status>TESTING</status>
    </scriptdeployment>
  </scriptdeployments>
Like so?
Copy code
An error occurred during custom object validation. (customscriptdept_color_code)
Details: The recordtype field for the customdeploydept_color_code (scriptdeployment) subrecord must not be record.Type.DEPARTMENT.
File: ~/Objects/customscriptdept_color_code.xml
j
Oh nevermind. I thought you were referencing in the script itself not an SDF deployment.
b
🙂
Yeah, what's really annoying is if I choose "RECORDS" to have it deploy to everything, it triggers on almost everything except for the Classications records