locked
Transactioncurrency add field RRS feed

  • Question

  • Hi,

    I need to add a new field to a transactioncurrency entity, that will contain an CurrencyNumberCode (USD = 840 EUR = 810).

    How can i do this?

    Thursday, January 15, 2015 10:04 AM

Answers

  • Hello,

    Unfortunately that is not possible because transactioncurrency entity is not customizable so you would not be able to add fields to it. As a possible workaround you can create custom entity, add relationship between currency and that entity and store code inside that entity.


    Dynamics CRM MVP/ Technical Evangelist at SlickData LLC
    My blog

    • Marked as answer by xjomanx Thursday, January 15, 2015 1:18 PM
    Thursday, January 15, 2015 10:53 AM
    Moderator

All replies

  • Hello,

    Unfortunately that is not possible because transactioncurrency entity is not customizable so you would not be able to add fields to it. As a possible workaround you can create custom entity, add relationship between currency and that entity and store code inside that entity.


    Dynamics CRM MVP/ Technical Evangelist at SlickData LLC
    My blog

    • Marked as answer by xjomanx Thursday, January 15, 2015 1:18 PM
    Thursday, January 15, 2015 10:53 AM
    Moderator
  • Thanks. There is another problem:

    In transactioncurrency there are two standard forms. When i tried to add new field (in the main form) i founded a field (don't remember name) in that form, that was not in database. When i tried to change it, system throw me an exception.

    Then i deleted this field in a form editor and saved changes. Now, i can edit form without exceptions, but, when i go to transactioncurrency entity, system throw me an exception.

    In database, in table SystemFormBase i found two entities old and new.

    Old entity contains an xml part:

    <row>
      <cell id="{7D864CA9-C7AF-4117-AD94-15BB59E5A1E1}" colspan="2">
        <events>
          <event name="onchange" application="true" active="true">
            <InternalHandlers>
              <Handler functionName="Mscrm.currencytype_onchange" libraryName="TransactionCurrency_main_system_library.js" handlerUniqueId="d24b3f93-1dac-44f7-8c39-7222e23caf5d" enabled="true">
                <dependencies>
                  <dependency id="isocurrencycode" />
                </dependencies>
              </Handler>
            </InternalHandlers>
          </event>
        </events>
        <control id="currencytype" classid="{67FAC785-CD58-4f9f-ABB3-4B7DDC6ED5ED}" />
      </cell>
    </row>

    Which is not exits in new entity (I think that this row i deleted).

    How can i rollback my action?




    Thursday, January 15, 2015 12:28 PM
  • Rolled Back :)

    I simply rolled back database on previous backup point.

    May be anybody knows another method to roll back my action?

    Thursday, January 15, 2015 1:17 PM