Hi all, I have a query on below use case. I have c...
# suitescript
c
Hi all, I have a query on below use case. I have created a custom record and with custom fields. Created a bundle and deployed to account. After some days I renamed custom field label and id. Now when I create and deploy new bundle previously saved values on custom recorded are getting empty. Is there any way to hold those values with updated field?
b
this sounds strange
are you creating another bundle, or are you updating the existing one
c
Updating existing one @battk
I mean editing same bundle with suite builder and deploying to another account
b
did you mark include data for your custom record
c
No, we haven't marked that. Do we need to mark it @battk? We are not adding any new data through bundle, but just renaming existing custom field
b
im not sure what you are expecting to happen or even what your problem is
if you are deploying a bundle to a new account, there is no existing data
so im not sure what is being emptied
c
To give some more info. First I created bundle with custom record and field of type check box. This is installed into one account
Some data has been created
Now I am changing field I'd and label of that check box created new version
Of bundle
Now upgrading that bundle
Expectation is it should preserve data with latest label and id
But when we see it is showing empty/ deafult value as No as that is checkbox
b
as long as you didnt delete the old field, your data should be intact
c
Hmm . But for us it is behaving weirdly.. we are losing data. We tried one way to test. Before update we throw exception and checked custom record. By this time renamed field is removed from custom record. And after update or some where adding this as new column
b
again, the scenario you are describing sounds like the old field was deleted
this would be very easy to do if you made the field update via sdf
c
To create bundle (where we are doing Bundle) we are first doing SDF deployment only. But for customers we have to provide as bundle only as of now.
b
sdf uses scriptids to identify fields, if you changed it, it would add a new field
c
But as an alternative we added back again the changed field with same name and id
So that thinking renamed value will be considered as new field
And thought to migrate data
From old field to new field
On after update
b
your new field is not the old field, even if it has the same script id
doesnt matter, the bundle uses the internal id of the field to determine if its the same
c
So no way to hold that data now ?
b
if your old field was deleted, your data is not safe anymore
c
Hmm ok thank you @battk
b
you will probably need some sort of plan to save your old data elsewhere and move it to the new field
c
Yeah, but just wondering which event could help us here.
Some solutions I found are like running different bundle to copy of data, but this is not feasible
b
i dont think you have much of a choice
your existing bundle cant be used to update if your old field was deleted
it will cause data loss
c
@battk thinking in another way, is it possible to revert bundle to its previous version state? Have you ever heard that
b
nope, the version is basically a display value
you dont actually need to change it
its a weakness in the bundle system, bundle updates/install just take whatever is currently in the account
its why its basically mandatory for there to be different accounts for deployment and development and testing
c
I mean in suite builder if we can get the state where our field was changed we can make chnages as required
Ok