How to Export and Import Dataverse Choices between Environments - power-automate

We are trying to export a Managed Solution from a Power Automate Development Envronment to a seperate Production one. On Importing the Solution it complains of :
"Import failed due to missing dependencies"
It then lists the missing dependencies and they are all Choice columns (Example):
additionalOcSignerYN cr3b4_additionalocsigneryn Choice MVV (AdditionalOcSignerYN) Column
I can see in the exported solution zip it has not included the Choice column data (simple Yes\No).
I have then installed and attempted to use the Common Data Service Configuration Migration Tool to migrate the data the Solution relies on. I have Created a Schema from the Solution, Exported the Data and then attempted to import it. It also fails to import due to the missing Choice columns. In the Schema I note that the Field that references the Global Choice schema has been included but the Choice hasn't been included.
<entities >
<entity name="cr3b4_mvv" displayname="MVV" etc="10121" primaryidfield="cr3b4_mvvid" primarynamefield="cr3b4_mvvname" disableplugins="false">
<fields>
<field displayname="AdditionalOcSignerYN" name="cr3b4_additionalocsigneryn" type="optionsetvalue" customfield="true" />
</fields>
</entity>
</entities>
I considered recreating the Global Choices manually in Production but also noted it would create new field prefixes i.e. "cr3b4_" would be something different and hence break the import.
How do I Export and Import a Solution that references Global Choices from one environment to another please?

Have you tried the "Add required components" button to add it to the solution?
Configuration migration tool, will not add schema updates to another environment only data.
When you want to add a choice column into a solution and import it into another solution you just need to add that column and the choice to your solution.
For example, I have created a solution "Solution 1" where I added the "Account" table, created a new Choice column "YN new choice" and created a new global choice options "YN new global choice"
Then, I created "Solution 2" with a different publisher and added some customization to the Account main form where I use the column created in "Solution 1"
If I try to export "Solution 2" and import it into a new environment, I'll get an error because the choice column was used in the form, but the column and choice were not added to the solution. As you have seen already just having the column in the solution is not enough.
So, you have 2 options:
Manually add the missing components
Use the "Add required components" button
For option 1, you have to track and add each component manually. If it is the choice column and options, go to the table that contains that column. If the table is not part of your solution you will have to add it (for example, if you have a view that references that column from a related table).
Navigate to "Columns" and click on "Add subcomponentes"
Search for the choice column and add it to the solution
Next, we need to add the options. In your solution, select the "All" option and click on "Add existing"
Then go to "More" and click on "Choice"
Search the choice and add it to the solution
For option 2.
Please be aware that this "Add required components" can sometimes add more components than the ones you might want (for example, components from another solution that you already imported in prod and wanted to keep separated)
Select the component in your solution and then click on "Add required components", after some time, it will add the dependencies automatically.
You have added the dependency the form had, but now you need to add the dependency for the choice column, select it and click on "Add required components"
Again, after some seconds you should see that the "Choice" component was automatically added.
Now, you can export you solution as managed again, and import in the other environment.
Please let me know if this helps.

Related

How to drop a class (table) in Back4app Dashboard

I'm new to parse and back4app. While I'm trying to delete a class (table) in the dashboard, I can't find any menu item that allows me to do it. Can anybody point me to the right direction?
Also related, is it possible to change a column's name after it is added, and is it possible to bulk update rows for certain fields, all within the dashboard?
Well, actually I just found part of the answer. The "Delete this class" menu item is in the top right Edit menu, as shown in this screenshot:
In order to delete the class, it must be empty, so you firstly need to delete all rows before deleting the class.
It's not possible to edit the column's name from the dashboard, so, what you may do is exporting the data and import your JSON file with the right name.
Another option that is not recommended if you're not sure about it, is updating the column's name through Mongo commands.
You'll need to update it in the collection (the class) and in the SCHEMAS too.
The connection string to help you with the mongo commands is available at Server Settings > Core Settings > Settings > MongoDB Database URI.

MS Dynamics CRM 365 - import data from Excel files

I'm getting into MS Dynamics CRM 365 programming, and have been dealing with data imports of lookup / reference entities.
I created a new entity with just the default Name column, stored and published it, and then went to look at in CRM. From the default "main" view, I choose the "Data Import" option and downloaded a template .xlsx file, which I then filled out. After that, I chose "Import Data" and uploaded this filled out .xlsx, and it was submitted, parsed, transformed successfully and the rows I had entered show up as expected.
So far, so good.
Now I created a second lookup entity (again with just the Name field), published it, and thought I'd be smart and just "re-use" that .xlsx "template" I had downloaded for the first lookup entity, and enter the new values for the second lookup entity, and then upload this manually "recycled" file. I did change the file name of the .xlsx, as well as the worksheet name, to match the name of the second lookup entity.
And while the upload, the parsing and transforming worked just fine - the actual rows I had inserted ended up in the first lookup entity...
So my conclusion is: somewhere, CRM must keep track of what entity that .xlsx was indended for - and it's neither the file name of the .xlsx, nor the name of the worksheet (which I had also updated) - it must be stored somewhere else.
Does anyone know where?? Can I change it somehow (manually or programmatically)?
After I went through the full cycle again (download import template .xlsx, fill that out, upload that file) - it works just fine for the second lookup entity, too.
There will be a hidden sheet in Excel file, but we cannot unhide it. That’s where all the configurations are stored.
But you can see it when you do something like explained in this blog, you have to click “View code” option from context menu, by right clicking sheet name tab in Excel file.
Then by opening the “Project explorer”, the hidden sheet will be visible in VBA, set the visibility to 1 – xlSheetVisible. Don’t save anything.
I believe the issue lies in the hidden first three columns, the first of which contains the entity name in the header.
When working with import templates, especially when exporting for reimport, these columns are key. The first column holds the Guid of the record, the checksum tells the system if the user touched the data in the row, and the modifiedOn allows the system to know if the data was changed in the system after the export.

sql to insert default attribute values to all products in magento

I installed an extension that adds an attribute which you can turn on per product when you edit or add a new product... but I need to add it to all existing products.
a) sql?
b) point me to a class somewhere that does this for a Magento collection?
Similar question, but I need to do it in sql or module: Default attribute value for all product in magento
adds an attribute which you can turn on per product
Been here before.
Does it show up in product maintenance now that the module is installed? If so, then it will show up in an export profile. Make an export for skuid, store, type and the new attribute and export to a CSV file. Make sure use Magento column headings is set to yes. Set the new attribute to what you need it to be in the CSV file for what product you need set and import it using the Import All Products profile.
Freshly installed module attributes will default to blank until something edited on the page the attribute shows on is saved. Use the profile import to set them all to yes or 1 if it's a yes/no enable type field to enable across the board. You will have to check the export to see if they're using yes/no in the database or boolean 1/0.
If this attribute is a dropdown item, you will need to create all the selection items in Attribute Maintenance and make sure the value in the upload file matches exactly the selection in attribute maintenance so the upload will work.
As an added note, if this attribute is only created on simple items, filter your export to only include simple items for inclusion in the import file.
It sounds like one of those one-time deals where expending a lot of effort on throwaway code violates the KISS method when a simple import will fix it and you're done with the operation for good.

How do you create a report (rdlc) that shows 1 record per page

Having some trouble getting this to work... I basically want the report to look similar to:
The way I remember doing this in the past was by creating "page groups" in the report wizard. However, I believe that was in VS05, and now the report wizard is very different in VS10. It now has column groups and row groups but no page groups, and I can't see how to get this to work without the wizard either. If tried looking for a tutorial or example but haven't had much luck. Also, the site 'gotreportviewer.com' is pretty terrible and has not been much help.
To create the effect of one record per page means you need to set a group element to the report. For instance assume you have a database table called "Login" and you wanted to group by a person's login name. Here is what you do:
First add a table to the report like so:
The table can be found in the "Toolbox" on the left hand side of VS2010. Once the table is added you will want to add a group to this table:
After this you will want to go to the properties of the group:
Here you simply can set a page break between each instance of a group, in addition, this will give you a "one record per page".

CRM 2011 - How to update Marketing List Member Type options to reflect entity display name changes?

Is there a way of updating the Option Set options for the Marketing List Member Type to reflect an entity display name change? i.e. if the account entity has been renamed to organisation, is there a supported way of reflecting this in the displayed options? I have been able to achieve this using javascript, but wondered if there was a better way of achieving this? At the moment I am unable to change the descriptions of the current options: Account, Contact or Lead.
Simple solution..
Create a Solution in your crm org. Add Marketing list to it.
Export the translations from the solution and when you open the translation excel file you will see all 3 picklist values.
from there you can change the values.
If you have to rename an existing entity, you should also rename its 'messages'.
You will find them in the customization area. Open the entity account. There you will find 'messages'. These are the strings which are used for the entity.
For a complete renaming, you have to replace the term 'account' in these messages.
It's just a normal Option Set on the Marketing List entity called "createdfromcode" which has three options (Account, Contact, Lead) and the underlying values match the entity type codes (1,2,4).
You can't edit this option set directly, but you could set up your own with appropriate values and the labels you want to use, add that option set to the form and use javascript to copy the selected value into the existing field (which you keep on the form but not visible).

Resources