price lists and quotes RRS feed

  • Question

  • Is there a way when a new quote or order is started that the price list can be set to standard and if someone wants to change it then they can click on it? Right now we only have a standard list. It would be a nice convenience. The default is blank and you have to choose one.

    Friday, January 18, 2013 5:31 PM


All replies

  • You can look at the examples here:

    Setting default lookup values with JavaScript in CRM

    This example isn't portable across deployments because it uses the identifier of the actual record - but it saves a trip to the database to look up the id based on a name that might be common between environments.

    Jason Lattimer
    My Blog -  Follow me on Twitter -  LinkedIn

    Friday, January 18, 2013 5:41 PM
  • I like that and I think it will work for our needs (don't need the portability). How do I find the GUID of the entity?

    Friday, January 18, 2013 6:57 PM
  • Open up the record (like price list) in the browser - hit F11 to go full screen and grab the full URL - looks something like this:


    The guid here = F4DD4D2F-C86E-E111-A499-00505685006C - right after "id%3d%257b"

    Verify the number of characters = 32 without the dashes to make sure you copied it correctly.

    Jason Lattimer
    My Blog -  Follow me on Twitter -  LinkedIn

    Friday, January 18, 2013 7:01 PM
  • Thanks for your help so far, I'm not a whiz by any means with CRM and js, can you provide some assistance on how to add this into the form? The description in the blog entry is a little light for my still limited knowledge on CRM

    I assume the form I need to edit is the quote and order forms, then I click on form properties and thats where it gets fuzzy......

    Friday, January 18, 2013 7:55 PM
  • Friday, January 18, 2013 8:31 PM
  • Thanks Jason,  that does help, the only part I still have a ? about is in the article for the scripts it shows:

    MyNamespace.Product_OnLoad = function() {

         if (Xrm.Page.ui.getFormType() == 1) { //Create


    and from what I can tell this tells the system to run only if it's a new record. Where does this piece go?

    Sunday, January 20, 2013 6:39 PM
  • Right - you would only want to run it when you are creating a new record as opposed to opening an existing record. 

    You would need to call this method in the form's (Quote or Order Detail) OnLoad event. 

    Jason Lattimer
    My Blog -  Follow me on Twitter -  LinkedIn

    Monday, January 21, 2013 3:13 PM