locked
How to Map currency to child entity ? RRS feed

  • Question

  • Hi all,

    Based on the currency value in Order form, i want to reflect the same currency to the child entity of order form. How to map currency between parent entity & child entity.

    At present if i change the currency in order form, it is not reflecting in child entity. the default currency exist in child entity. so i have to change manually in all the child entity. Any solution for this?

    Thanks

     

    Wednesday, January 18, 2012 1:26 PM

Answers

  • Hi
     
    Did this help?
     
    Please make sure to mark as answer to the response that helped you get through. This will help others with similar problem identify the answer and also close this thread as resolved.
     
    Thanks
     
    Dkay
    • Marked as answer by Shankarbala Thursday, January 19, 2012 1:03 PM
    Wednesday, January 18, 2012 10:22 PM

All replies

  • Hi,

    if you mapped the the Currency Field of the "Quote" and "Order" Entity, in order to reflect it in the chidl entity, you have to convert your specific Quote into in Order(that's mean you have to create the a child records in the context of the parent record/Entity), in this Case you ll be able to have the same value on both child and parent.

    But when you are in Child Entity, any change you 'll make there on any fields, even the "mapped Fields" will not be populated to the parent , what you can do is to create a workflow a a javascriptscript to update the "mapped value" of the parent or child entityty, everytimes these values will change

    Please mark as Answer and Vote as Helpful Post if this Post helped you

    Thanks


    If this post answers your question or was helpful, please click "Mark As Answer" on the post and "Mark as Helpful" Be wise
    • Edited by TheeNerd01 Wednesday, January 18, 2012 3:51 PM
    • Proposed as answer by Shank Bala Thursday, January 19, 2012 1:42 PM
    Wednesday, January 18, 2012 2:00 PM
  • Hi Shankarbala,

      I personally think that you best option would be to update the child lookup to be in sync with the Parent lookup (Order)

     using Javascript ,

     You can alway do it on Load Event  of the Child Entity form , Check the Parent Lookup value and set the Child lookup it if its different .

      eg

         parent.document.getElementById(

    'currency_lookup'

    ).value

    hope I was clear in my explaination

    dkay

    If the problem is resolved, we would appreciate a post explaining the resolution and mark the post answered and close the thread.

    Wednesday, January 18, 2012 3:01 PM
  • Hi,

    in this Thread , Mitchel almost  gived the same answer as me, sayoing you ll need to write a "custom workflow" or "Javascript"code

    Please also have a look at this and mark my Post as Aswer and vote as Helpful Post

    Here is the Link:

    http://social.microsoft.com/Forums/en-US/crm/thread/a4afffd3-c088-4274-9ea7-77456c602661

    Thanks


    If this post answers your question or was helpful, please click "Mark As Answer" on the post and "Mark as Helpful" Be wise
    Wednesday, January 18, 2012 7:19 PM
  • Hi
     
    Did this help?
     
    Please make sure to mark as answer to the response that helped you get through. This will help others with similar problem identify the answer and also close this thread as resolved.
     
    Thanks
     
    Dkay
    • Marked as answer by Shankarbala Thursday, January 19, 2012 1:03 PM
    Wednesday, January 18, 2012 10:22 PM
  • Hi,

    Please Vote or mark as answer if my answer help you

    Thanks


    If this post answers your question or was helpful, please click "Mark As Answer" on the post and "Mark as Helpful" Be wise
    Thursday, January 19, 2012 1:39 PM
  • Hi , I tried this coding but it shows error on the below syntax; "parent.document.getElementById('transactioncurrencyid').value" Here "transactioncurrencyid" is the base currency lookup attribute name. thanks shankar bala
    Monday, January 23, 2012 12:26 PM
  • Hi ,

    I tried this coding but it shows error on the below syntax;

    "parent.document.getElementById('transactioncurrencyid').value"

    Here "transactioncurrencyid" is the base currency lookup attribute name.

     

    thanks

    shankar bala

    Monday, January 23, 2012 12:27 PM
  • Hi

    check this likns

    you ll see how you can retrieve the id of a lookup field

    http://crmdm.blogspot.com/2011/03/how-to-retrieve-lookup-text-value-id.html

     

    it is basically like this

    Code Snippet:

    var lookupObject = Xrm.Page.getAttribute("yourlookupattributename");
     
        if (lookupObject != null)
      {
     
            var lookUpObjectValue = lookupObject.getValue();
     
            if ((lookUpObjectValue != null))
            {
     
             var lookuptextvalue = lookUpObjectValue[0].name;
     
             var lookupid = lookUpObjectValue[0].id;
     
            }
     
      }

    Please make sure you voted and marked as answer


    If this post answers your question or was helpful, please click "Mark As Answer" on the post and "Mark as Helpful" Be wise
    • Edited by TheeNerd01 Monday, January 23, 2012 12:49 PM
    Monday, January 23, 2012 12:42 PM