Order - Set price list based on account RRS feed

  • Question

  • Hi,

    As you know, when creating an order from Account, both Account and Price-list will be mapped and populated on the ordrer.

    But when creating a new blank ordrer from the CRM-menu nothing is pre-filled. To make this registration process easier, I'd like to use a javascript that triggers onChange when you choose Account; and filles in the default price list registered on the Account.

    Does anyone have a similar javascript I could use. Or suggestions on how this could be done?


    Tuesday, September 20, 2011 12:06 PM


  • I just paste something like that in the following forum


    make few changes

    Replace this  var guid = Xrm.Page.data.entity.getId();

    with var guid = Xrm.Page.data.entity.attributes.get("customerid").getValue()[0].id;

    Replace  alert("ACTION: Retrieved account Name = \"" + retrievedAccount.Name + "\", Telephone = {" + retrievedAccount.Telephone1 + "}")

             var lookupValue = new Array();

             lookupValue[0] = new Object(); 

             lookupValue[0].id = retrievedAccount.DefaultPriceLevelId.Id; 

             lookupValue[0].name = DefaultPriceLevelId.Name; 

             lookupValue[0].entityType = "pricelevel";

    then set the value of pricelist





    I hope this helps.

    Amreek singh Senior CRM Consultant CDC Praxa Sydney,Australia http://mscrmshop.blogspot.com/
    • Proposed as answer by Amreek Singh Tuesday, September 20, 2011 12:46 PM
    • Marked as answer by Donna EdwardsMVP Friday, September 23, 2011 4:53 PM
    Tuesday, September 20, 2011 12:46 PM

All replies