Hi
Let's say that I want to add a new unique index to a table in D365FO, but in order for this to work I need to manipulate the records in the table before the db-sync is executed, how to do that with a deployable package?
Thanks
When you say , you want to manipulate records , do you want to correct data ? If yes , first correct data in one deployment using your first package and then release a package which has index changes.
I was more thinking of something like this:
docs.microsoft.com/.../pre-post-scripts
at the 'Servicing' sections it indicated that it is possible to execute some scripts, but I have not been able to find any information about it
As been said you have to deploy first package with a script to correct data, run it and then deploy second package with new index, there is no other way to do so.
Hello Rabol,
Under the servicing section of the article that you shared, it states that the existing artifacts are validated first.
As Sukrut and Ievgen mentioned, your data exists initially and you will need a runnable class to manipulate the data. Add the index to the table once the data is manipulated and then run the db-sync operation.
On the other side, you can setup a release pipeline through Azure DevOps to trigger your Pre-deployment and Post-Deployment scripts. This release definition will automate your deployment operations that you run regularly.
Thanks,
Navneeth Nagrajan | Dynamics 365 Technical Consultant
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
CA Neeraj Kumar 2,157
André Arnaud de Cal... 883 Super User 2025 Season 2
Sohaib Cheema 674 User Group Leader