I have exactly the problem in this post from 2021:...
# sdf
c
I have exactly the problem in this post from 2021: https://archive.netsuiteprofessionals.com/t/389569/hello-all-i-am-getting-an-error-when-i-try-to-do-suitecloud-#6c1070ca-a5bc-4a27-a737-2924c7eaa1de I've pasted it below for convenience. Has anyone any idea how to solve it? I have SDF 3.1.2. --- Hello all, I am getting an error when I try to do suitecloud project:validate Copy code
Copy code
Error Message: The permissions specified in the "customrecord_1" customrecordtype object do not match the permissions in the "customrole_1" role object.
Both of the custom record and role contain Copy code
Copy code
<permission>
      <permkey>[scriptid=customrecord_1]</permkey>
      <permlevel>FULL</permlevel>
      <restriction></restriction>
    </permission>

  <permission>
      <permittedlevel>FULL</permittedlevel>
      <permittedrole>[scriptid=customrole_1]</permittedrole>
      <restriction></restriction>
    </permission>
Any idea how to solve it?
a
Please try:
suitecloud project:validate --server
c
Thank you. That doesn't return the permission errors. Instead it returns circular dependency warnings involving the same permissions, like this:
Details: Circular dependencies detected. The following custom objects reference each other in a way that creates direct dependencies:
And then it mentions the same roles and custom records again.
customrole_1 -> customrecord_a -> customrole_2 -> customrecord_b -> customrole_1
But I don't know how to avoid this because both roles reference both custom record types and both custom record types reference both roles. And I don't know how to understand the fact that validate without --server shows errors that validate with --server does not return errors. Are they errors or not? Does validate without --server work properly, or should I avoid it?
a
I'm not 100% sure but I assume you can set only 1 of the role or the record permissions... rather than both idk if there's a specific order to do it, or if its just needs to be one then the other with the references removed from whichever is first. I'd assume the record should be created first without permissions. Then then role with the permissions
☝️ 1
you can organize the object xmls into sub folders, and then give the order you want the objects deployed in the deploy.xml
☝️ 1
d
I did this recently and found that I had to import the custom record without permissions, then the permission onto the role. I believe I did this in two separate deployments
c
Thanks both. I found that when I had dealt with all other (non-circular dependency) validation errors, the circular dependency warnings magically vanished and now
suitecloud project:validate --server
is happy that everything is ok. Not sure this behaviour of
suitecloud project:validate --server
makes sense, but I'll try to forget about it and move forwards with my life :)
👍 1
a
--server is always recommended. Without it it's just a validation against local metadata. (Which is somewhat prone to false positives) With --server it validates against account, and more reliable.
👍 1