CRM Configuration Migration - Currency - dynamics-crm

I create a record in CRM that contains an option set and 4 currency fields, I export the record using the CRM Configuration Migration tool, I delete the record in CRM, and finally I import the record that I just exported. After the import I was expecting to see a record identical to the one that I exported and deleted however the option set field is populated but none of the currency fields are populated - weird. I open the zip file that was created by the export process, I open the data.xml file within it, and I locate one of the currency fields:
<field name="new_rate1" value="&#163;‎1.00" />
<field name="new_rate1_base" value="&#163;‎1.00" />
If I manually remove the '£' from the first row, i.e.
<field name="new_rate1" value="‎1.00" />
<field name="new_rate1_base" value="&#163;‎1.00" />
and import the data the currency field value will be imported correctly. Surely I shouldn't have to manually edit the XML file. I believe that this is either a bug in Configuration Migration tool or that I am doing something wrong, but I can't think what. Does anyone have any thoughts or ideas?

Related

How to type into text box generated dynamically

I am trying to input data into a dynamically generated text box, but i get the following error:
Cannot find the UI element corresponding to this selector: <webctrl id='dp1545483054838' tag='INPUT' />
Steps to reproduce the issue:
Go to www.mockaroo.com
Rename gender to date
Click on on Gender under Type and type date in the search and then select Date
This will display two fields from date and to date (dynamically generated). I want change the date in these fields.
Similar to the comments, I did not have any issues creating a selector to target the start of range or end of range date fields.
However, in practice, as the form is dynamic, the IDs of the fields will change each time you load the page or introduce a new field so I would not recommend using the ID to select the field.
I dabbled on the page a little to get a feel for it and here are the tidbits that I noticed that might help you out. Without seeing a sample of what you've tried already, this is just a guess at what you are trying to achieve.
Ui Explorer generates the following by default
<html app='chrome.exe' title='Mockaroo - Random Data Generator and API Mocking Tool | JSON / C*' />
<webctrl id='dp1546757265980' tag='INPUT' />
Check that you are in scope of your selector if you are wanting it to be relative or ensure you are correctly defining a valid hierarchy if using an absolute.
Determine a good hierarchy and a few attributes to use that would allow you to specify the field you want while not using attributes or values that are too ambiguous or would never be the same twice
The first thing that I noticed for the start and end date fields is they have a title attribute start of range and end of range values respectively. I think this would be a good start, for myself I ended up including a few more attributes.
<webctrl tag='INPUT' aaname='start of range' name='*min_date*' parentclass='options' parentid='fields' />
Thinking about this a step further, due to the nature of the form you could have multiple option fields that are of the type Date, so I anchored my selector to the date name field to ensure I was targeting the correct options.
While adding the anchor I noticed that after changing the name field from "gender" to "date" that the HTML code did not update the value to reflect this so it still had the original content
<input placeholder="enter name..." class="column-name form-control" spellcheck="false" type="text" value="gender" name="schema[columns_attributes][4][name]" id="schema_columns_attributes_4_name" uipath_custom_id="1">
So instead of being misleading the second time I selected/anchored the Name field, I added a Find Element activity and created an output Ui Element variable to pass to the other activities.
Sample XAML project

ODI 12c DB to XML

I am trying to map oracle db to an XML file and have come to a blocker.Would appreciate any help.My xml file has the following structure
<Root>
<Import>
<Add-Item1>
.
.
<Add-Item n></Add-Item n>
</Import>
Odi 12c xml driver generates a ParentElementFK CurrentElementPK and CurrentElementOrder,corresponding to every tag that is there in xml.
My issue is in spite of scouring oracle forums i have not found a good definition of what data we need to populate in these ODI generated columns. Are these only for maintaining the hierarchical relationship?if so,wouldn't they be populated automatically on reverse engineering?.suppose the data that i would fill in this xml structure would be of an item with properties-brand,description item id(child tags under ) .Do these generated columns play any role in the mapping?
I have tried multiple things and found the answer myself . here is what i understood. Suppose you have Import complex type and Add-Item complexType . It will generate two datastores in model one for Import and one for Add-Item. First populate the primary key of the Import Complex type. Then you will see IMport FK in the Add-item complex type populate this value with the same value as you populated above that works . All other order and can be left optional if you don't need any particular order of these

How do I create an index online with liquibase?

I have a migration that will create an index in a table of our Oracle database. The DBA would like the index to be created ONLINE. (Something like CREATE INDEX ..... ONLINE;) Is there something I can add to the tag below to accomplish what I want or do I need to write the SQL into the migration?
<createIndex tableName="USER" indexName="IX_USER_TX_ID">
<column name="TX_ID" />
</createIndex>
There is no standard tag to specify it as ONLINE. Your 3 options to create it as ONLINE are:
Fall back to the tag where you specify the exact SQL you want
Use the modifySql tag to append to the generated SQL.
Create an extension to createIndex that always generates ONLINE at the end of the SQL or adds a parameter to createIndex that allows you to control if it is added or not.
Option #2 is probably the best mix of easy yet flexible and would look something like this:
<changeSet id="1" author="nvoxland">
<createIndex tableName="USER" indexName="IX_USER_TX_ID">
<column name="TX_ID" />
</createIndex>
<modifySql dbms="oracle">
<append value=" ONLINE"/>
</modifySql>
</changeSet>
Notice the space in the value tag. Append does a very simple text append with no built-in logic.

Convert Int32 to Oracle number(5) with EF4

I am using EF 4 (database first, model fully generated from it) with an oracle 10g database and I have a problem with one field.
My field is defined as a NUMBER(5) in my database. In my model, EF has defined it as a short.
My problem is that i have some values that are greater than 32,767 (max of a short)
I found this post : Entity Framework generates short instead of int. I follow the instruction and it works, my model contain now Int32 values.
But I have a new problem :
Error 2019: Member Mapping specified is not valid. The type 'Edm.Int32[Nullable=True,DefaultValue=]' of member 'XX' in type 'Model.XXX' is not compatible with 'OracleEFProvider.number[Nullable=True,DefaultValue=,Precision=5,Scale=0]' of member 'XX' in type 'Model.Store.XXX'.
This error is always show in the Error List tab of Visual Studio. However, the build success, and it half works:
read a value in database works
write a value do not work : 99999 was transformed in -31073 (see edit)
Is there a solution to have it works on both ways ?
BTW, is there any way to tell entity to use int32 for oracle INTEGER fields ? It use decimal by default.
EDIT
While debuging step by step, I found why my value was -31073. I forgot this line :
dao.Value = (short)dto.Value;
My two values were int, but the implicit conversion in short was the origin.
I found how to remove the error.
I edited the edmx file in xml mode, found my field in the ssdl section :
<Property Name="SIT_INSEE" Type="number" Precision="5" />
I removed the Precision="5" and the warning disappeared.
Just to add my two cents in case anyone else is having similar problems. I noticed if you add the following to mappings in web.config and then recreate the edmx model from scratch (delete it and re-generate from database) it resolves some of these issues. Where simply adding the values to web.config resolved nothing (probably re-generating some of the code behind the scenes would be my guess).
<oracle.dataaccess.client>
<settings>
<add name="int32" value="edmmapping number(9,0)" />
</settings>
</oracle.dataaccess.client>

Entity Framework is padding out my text fields although they are not Fixed Length

I am building an MVC3 site using Entity Framework 4 and I'm having a problem with fixed length fields.
When I look at my code during debug it shows that MyEntity.Title="Hello name " with the title padded out to the maximum length of the field.
This is usually a question of having fixed field length in the EDMX file or using a char data type on the underlying database rather than a varchar. In this case neither of those is correct, however it is possible that the problem fields were of fixed length originally. I have manually changed each field in the EDMX ( and the model has been regenerated ) and the fields were never fixed length in the database ( which was the starting point for the application ) so I guess that the need to pad out the fields is being stored somewhere in the Entity Framework configuration and hasn't been updated.
The problem occurs in new records when they are added to the database- when the object is created the Title will be correct, when it is instanciated from the database it is padded.
What do I need to do in order to get rid of the padding, which is really screwing up my string comparisons unless I trim everything?
It turns out that in the .EDMX file the padded files were still listed as nchar. This wasn't visible through the Model Editor, the only way to change it was to right-click on the model in Visual Studio and select "open with..." then use an XML editor. The offending fields looked like this:
<Property Name="MyProperty" Type="nchar" Nullable="false" MaxLength="50" />
Changing the Type to nvarchar and running the template again seemed to clear the problem up.
Existing fields do not get updated in the model when you update it from the database. You either have to delete the entities from the model, or manually change those fields to the new values.
Check the property types in the Model Browser and make sure they are correct.
Change your Title field to have the Fixed Length property set equal to true. It's probably defaulting to none :)
Make sure you make the change in the dbase first and then update your edmx.

Resources