I was trying to convert a managed bundle to a suit...
# sdf
k
I was trying to convert a managed bundle to a suiteapp. I tried the following approach. Added suiteapp id in all objects. Created a suitecloud suiteapp project and downloaded all objects locally. Installed the bundle in one test account. Used suitecloud to install the local project in the test account. My. assumption is that suitecloud is the same as suiteapp control center. Noticed 2 things. • Installation failed with An object with script ID dfgd already exists • The app id was automatically stripped when installing the bundle. Anyone has any idea how to overcome this? Or even if its possible or not
b
That first issue occurred for me when the script record was missing app id on the UI. Added that to the record and I was able to deploy again.
m
are you trying to deprecate the bundle and move to the suiteapp structure? I wasn't aware, you are able to do this yet? If so please let me know how!
k
I am not sure if you can. I will resume testing on Monday.
m
Yeah. I didn't think you can yet. It's a huge problem. I've always failed with the error Installation failed with An object with script ID dfgd already exists
k
Yes but if you add the app id then this error goes away. Netsuite is stripping the app id when you do a bundle installation. Any idea what is this behaviour ?
m
ahh i'll have to try it out. Have you seen any documentation on this?
k
Nope 🙂
m
are you adding the bundle id to the suiteapp?
k
Also no
m
Are you connecting the bundle to the app in anyway or expecting the app to sort of merge with the bundle?
k
Only by app id.
Full steps I followed:
Added app id on all objects in dev account. Created a suiteapp in my local. Downloaded all the xml and code related. Modified paths for scripts in the file cabinet. Installed the managed bundle to a qa account as it would be a production account, Run suitecloud deploy.
m
What do you mean by added app id on all objects in dev account?
k
The last step gave me the same error as yours but I noticed that app id is stripped from my qa account. Next week I asked implementation team to stop installing the app to clients for some time. The plan is to unlock objects in the bundle and install the bundle one more time. Then in the qa account I will just fill the app id. Main goal is to test behaviour after the error that you are getting as well.
m
are you adding it to the internal id of the object?
k
message has been deleted
this one
m
hmmm. what record type are you on? i'm not seeing that in my account
k
go to user preferences and enable the option there
message has been deleted
m
okay thanks!. so the idea is if we attach the suiteapp id on the custom record that is in the bundle, it will be able to be connected to the suiteapp when installed?
k
Yes.
I tried and I am not getting your error with one object
I want to test with a full bundle that has different types of objects
m
okay. Thank you so much! We'll test this soon
k
Please tell me if you made a break through.
m
will do!
Yeah i just did a quick test and the app and publisher id were both blank after install of the bundle into the account and then the suiteapp validation failed with An object with script ID ... already exists
k
Any idea why they are blank ?
m
maybe the bundler does not intend to set the app and publisher id?
k
Do you know of any other way to set it? Like with a bundle installation script?
m
i'm not aware of being able to set id fields with such a thing. You could always open a support case
I just tested with an unlocked bundle and updated the record's app id after the bundle was installed and was able to successfully deploy the suiteapp to the account. It definitely should not be nulling the values with the bundle install. I'm going to see what support has to say
k
Yes I can confirm the above from my side as well
I also noticed two more things. The xml objects are still tied to the bundle so if I delete the bundle all is deleted even if the app shows installed. The other thing I noticed is that all existing records are not over written
m
Yeah I noticed the exact same thing. It needs to check to see if the records were installed with a bundle and if so, honor the suiteapp settings to preserve instances that were deployed with the bundle and suiteapp and then remove the connection to the bundle
k
From here on I think I need to wait for netsuite support. I have no idea how to do any of the above. At least now I am confident that no instances will be deleted
m
yeah i'm with you. have you tested to see if someone created a custom form or field on a record and know if it was deleted?
k
Nope I did not think of it. I expect not to be a problem since both are tied to a script id
n
We have a couple of BFN SuiteApps which are deployed using managed bundles. We are trying to migrate to SDF with the intention of using the SuiteApp Control Centre (same as @Kyriakos Zisopoulos). Our expectation was that we should be able to: 1. Add the App Id to all objects in the source account 2. Push a bundle update to populate the App Id on the objects in the target accounts 3. Abandon the legacy bundle and start using the SDF deployment mechanisms (e.g. SuiteApp Control Centre). However, step 2 is unsuccessful. The App Ids are not populated in the target account when we push the managed bundle to the target accounts. This appears to be the only obstacle holding us back. If we can get the App Id in the target accounts then we are happy to abandon the legacy bundle (leave it installed) and then manage all updates going forward using SDF. It is not practical for us to manually update the target accounts because we have hundreds of objects, hundreds of customers and we don't have access to all of our customer accounts. We have an open defect regarding this: Defect 660145: SDF > SDN Trailing account > Populate App Id on existing objects in target accounts I encourage anyone who is suffering from the same issue to log a support case and reference the defect. Maybe we will get some traction. 🤞
@Kyriakos Zisopoulos Do you need to uninstall the bundle? It's not ideal, but does it hurt to leave the bundle installed? If we can get the managed bundle to update the App Ids in the target account then we just plan to leave the legacy bundle installed and all further updates will be managed by the SuiteApp Control Centre. Then eventually perhaps NetSuite will implement a way to dissolve the legacy bundle.
k
No it’s not a hard requirement. Just a nice to have to have a clean system. I will just have to be prepared for arguments of the type: “What if someone thinks that the suiteapp is installed and un installs the bundle?”
I also asked our support team to open a partner support case from our side
n
I'm thinking we could add a check to the Bundle install script beforeUninstall function and prevent the uninstall if we detect that the SDF SuiteApp is installed. I've never used beforeUninstall, but I presume throwing an error would prevent the bundle from uninstalling.
k
Yes that looks like a good solution