locked
QuoteDetail with more addresses RRS feed

  • Question

  • My customer sells products that have multiple delivery addresses. Think network as an example. A 100MBit link is delivered at two locations, and in some cases the number of delivery addresses (installation addresses) for a single product can be arbitrary. In CRM a quotedetail has a single delivery address and can have one invoice address.

    It is not possible to create 1:N relationships for quotedetail (why, what could possibly be the reason for not allowing this?). So, I need to use an N:N relationship. It is not possible to create an N:N relationship from quotedetail to a customeraddress however. Again, why? I can not fathom, but that is probably a problem with me.

    So, I create a my_deliveryaddress entity, and lo-and-behold, I can now create an N:N relationship with my new address entity.

    My question is really only - where do I go from here? Once created, it doesn't seem to be possible to enable adding the address from the form editor in CRM. That is OK, I can add a button to in using ISV and do all the adding there. That is where I am currently a tinsy bit stuck.

    Once I have the user pick an address that I have looked up, how do I go about adding the N:N relationship between the quotedetail entity and the my_deliveryaddress entity? I have looked at LinkEntity and LookupEntity, but I seem to be hitting the wall. It is probably me. Any assistance would be appreciated.

    Wednesday, September 22, 2010 1:32 PM

Answers

  • You should take a look at my post http://bingsoft.wordpress.com/?s=address and in particular the link shown in my post to Dave Berry's example aswell.

    Your right that you cannot create relationships to customeraddress but there is an alternative. When you are adding an address to your order line I'm sure you want to keep that address the same even if a Contact changes there address in the future. The answer is to store the address fields on the quotedetail/orderdetail or invoice detail which ever you need and just let the user search for it using the standard CRM address dialog. This way you keep a history of where the items were delivered.


    MSCRM Bing'd - http://bingsoft.wordpress.com

    Check out the CRM 4 to CRM 2011 JavaScript Converter Tool
    Wednesday, September 22, 2010 1:58 PM
    Moderator
  • Just to follow up on what I eventually did.

    As I said in my original posting, a single product in my case can have multiple delivery addresses. Think about selling a dedicated network connection. If you are the one selling the connection, it has at least two delivery addresses, the two end-points. Our product is similar, but a single product can in fact have an arbitrary number of delivery addresses. Adding a new quotedetail for each "end-point" is not an option. Having multiple address properties on a quotedetail is also not an option (it might have been if we knew there were at most two addresses).

    My solution was as in-elegant as it was simple. I have created a new entity, my_installation_address. It has no relationships with anyone, but it does have a field for storing the quotedetail GUID. This gives me what I need, I can add as many delivery addresses as I wish with "references" to the quotedetail. The disadvantage is that I have to keep track of it all my self since the relationships are entirely maintained by my code. I'd prefer for MS Dynamics to do so, but that was not possible.

    Thursday, October 28, 2010 8:38 AM

All replies

  • You should take a look at my post http://bingsoft.wordpress.com/?s=address and in particular the link shown in my post to Dave Berry's example aswell.

    Your right that you cannot create relationships to customeraddress but there is an alternative. When you are adding an address to your order line I'm sure you want to keep that address the same even if a Contact changes there address in the future. The answer is to store the address fields on the quotedetail/orderdetail or invoice detail which ever you need and just let the user search for it using the standard CRM address dialog. This way you keep a history of where the items were delivered.


    MSCRM Bing'd - http://bingsoft.wordpress.com

    Check out the CRM 4 to CRM 2011 JavaScript Converter Tool
    Wednesday, September 22, 2010 1:58 PM
    Moderator
  • You make a very good point. I will of course have to store the installation addresses unchanged even if the account/contact address changes. Good point.

    I still have the same problem though. I can only add a single delivery address to quotedetail and a single billing address. In our case, a product is delivered to a number of addresses however. Again, as a network would be. I create an entity (like my_installaddress) where I store the address data. How do I make a 1:N relationship from quotedetail to my_installaddress? I can't create a 1:N relationship between quotedetail and anything on CRM 4.

    I guess I could add a string field to the my_installaddress entity and stuff the GUID of the quotedetail entity into that. Then I would be able to find that in the FilteredView, but it seems a little weird to do it that way.

    Wednesday, September 22, 2010 3:04 PM
  • Rather than trying to make relationships to Quote Detail, make it to the Quote.

    Regards, Donna

    Tuesday, September 28, 2010 5:44 PM
  • Rather than trying to make relationships to Quote Detail, make it to the Quote.

    Regards, Donna


    Donna, I think he was looking to have individual items sent to different addresses but i think I gave him the right idea about just holding the address fields against each item,
    MSCRM Bing'd - http://bingsoft.wordpress.com

    Check out the CRM 4 to CRM 2011 JavaScript Converter Tool
    Tuesday, September 28, 2010 8:42 PM
    Moderator
  • Donna, I think he was looking to have individual items sent to different addresses but i think I gave him the right idea about just holding the address fields against each item,


    Gotcha, thanks Rhett.  I guess my take on this is if an item on a quote is going to multiple delivery addresses, then I would probably be included to create one quote for each delivery address.  They can fairly easily create a copy button and then change the delivery address.  Although this means there will be more quote records, it has the potential to simplify other things. 

    I didn't completely understand Terje BK's follow-up question, maybe it is more clear to you.  In any event, it looks like he / she has a few options for consideration.

    Thanks again Rhett, for all your great help in the Forum!  Keep it up!


    Regards, Donna

    Tuesday, September 28, 2010 8:53 PM
  • Just to follow up on what I eventually did.

    As I said in my original posting, a single product in my case can have multiple delivery addresses. Think about selling a dedicated network connection. If you are the one selling the connection, it has at least two delivery addresses, the two end-points. Our product is similar, but a single product can in fact have an arbitrary number of delivery addresses. Adding a new quotedetail for each "end-point" is not an option. Having multiple address properties on a quotedetail is also not an option (it might have been if we knew there were at most two addresses).

    My solution was as in-elegant as it was simple. I have created a new entity, my_installation_address. It has no relationships with anyone, but it does have a field for storing the quotedetail GUID. This gives me what I need, I can add as many delivery addresses as I wish with "references" to the quotedetail. The disadvantage is that I have to keep track of it all my self since the relationships are entirely maintained by my code. I'd prefer for MS Dynamics to do so, but that was not possible.

    Thursday, October 28, 2010 8:38 AM
  • Great, glad you have a solution that works for you.  Love the flexibility of the solution, several options.

    Regards, Donna

    Thursday, October 28, 2010 9:49 AM