locked
Country - City - Shop. The city is moving. Changing the "Shop" - "Country" relation automatically RRS feed

  • Question

  • Hello all together,

    Situation: Country - City - Shop. 1: n - 1: n - 1: n relationships. How is it not stupid it sounds, I want to move the city in another country.
    Question: I want that in the "business" relationship "Shop" - "Country" is automatically changed. Is it possible?

    I thank you in advance
    Sebastian
    Friday, January 29, 2010 10:33 AM

Answers

  • Hi

    First of all i don't see the necessity of haveing the relationship between country and shop
    Country <-> Shop have the 1:n relationship. ( i think this relationship is not required)


    since shop is related to city and city is related to country
    so in-directly every shop is related to country.

    i.e shop==>city==>country means shop ==> country

    so please check your requirements do you really need this relationship? to me i doesn't make sense, since you can get the country of a shop in-directly as i told you above.
    ----------------------------------------------
    Yes you can certinally achieve the effect through plugin. you can look at the following articles from msdn.
    http://msdn.microsoft.com/en-us/library/dd393295.aspx

    You can write a plug-in in any Microsoft .NET 2.0 CLR-compliant language such as Microsoft Visual C# and Microsoft Visual Basic. Each plug-in assembly must be signed, either by using the Signing tab of the project's properties sheet in Microsoft Visual Studio 2005 or the Strong Name tool, before they are deployed to the Microsoft Dynamics CRM server.

    For more information about the Strong Name tool, run the sn.exe program, without any arguments, from a Microsoft Visual Studio 2005 Command Prompt.

    See Also

    Concepts

    Reference

    http://msdn.microsoft.com/en-us/library/bb955366.aspx


    but as i said above please look at the relationship, i still feel shop ==> country is not required.
    Friday, January 29, 2010 1:04 PM

All replies

  • Question: I want that in the "business" relationship "Shop" - "Country" is automatically changed. Is it possible?

    what i understand from your question, country has relationship with city and then country & city has relationsip with shop??
    correct me if i am wrong.
    In this case, first, why you are creating a relationship of country with shop, because it the relationship is already there in case of country==>city ==> shop.
    so if i had to know which shop a country is in? i can first get teh city and then country. there is no need to have relationsip of country & shop?

    however, if you want to have this effect, then you can  write a MS CRM Plugin on the city, and once the country of the city changes, then change the coutnry of all the shops associated with the city.
    Friday, January 29, 2010 11:23 AM
  • Question: I want that in the "business" relationship "Shop" - "Country" is automatically changed. Is it possible?

    what i understand from your question, country has relationship with city and then country & city has relationsip with shop??
    correct me if i am wrong.
    In this case, first, why you are creating a relationship of country with shop, because it the relationship is already there in case of country==>city ==> shop.
    so if i had to know which shop a country is in? i can first get teh city and then country. there is no need to have relationsip of country & shop?

    however, if you want to have this effect, then you can  write a MS CRM Plugin on the city, and once the country of the city changes, then change the coutnry of all the shops associated with the city.
    Thank you for your answer.
    I forgot to write:
    Country <-> Shop have the 1:n relationship.
    Country <-> City have the 1:n relationship.

    City <-> Shop have the 1:n relationship.

    I want to do a cascading lookup. "Shop" have 2 lookupfelds.

    >>however, if you want to have this effect, then you can  write a MS CRM Plugin on the city,
    >>and once the country of the city changes, then change the coutnry of all the shops associated with the city. 

    is it difficult?

    thanks
    Friday, January 29, 2010 12:49 PM
  • Hi

    First of all i don't see the necessity of haveing the relationship between country and shop
    Country <-> Shop have the 1:n relationship. ( i think this relationship is not required)


    since shop is related to city and city is related to country
    so in-directly every shop is related to country.

    i.e shop==>city==>country means shop ==> country

    so please check your requirements do you really need this relationship? to me i doesn't make sense, since you can get the country of a shop in-directly as i told you above.
    ----------------------------------------------
    Yes you can certinally achieve the effect through plugin. you can look at the following articles from msdn.
    http://msdn.microsoft.com/en-us/library/dd393295.aspx

    You can write a plug-in in any Microsoft .NET 2.0 CLR-compliant language such as Microsoft Visual C# and Microsoft Visual Basic. Each plug-in assembly must be signed, either by using the Signing tab of the project's properties sheet in Microsoft Visual Studio 2005 or the Strong Name tool, before they are deployed to the Microsoft Dynamics CRM server.

    For more information about the Strong Name tool, run the sn.exe program, without any arguments, from a Microsoft Visual Studio 2005 Command Prompt.

    See Also

    Concepts

    Reference

    http://msdn.microsoft.com/en-us/library/bb955366.aspx


    but as i said above please look at the relationship, i still feel shop ==> country is not required.
    Friday, January 29, 2010 1:04 PM
  • Thank you! The Shop have 2 relation, because the shop can be in chountry and have not the city. But I will thinking about relation. May be I don't need the realtion shop<->counry
    Friday, January 29, 2010 1:48 PM
  • "The Shop have 2 relation, because the shop can be in chountry and have not the city"

    Hi,
    hmmm, but still for every place there is city, there is no place in the world that has country but no city :).
    Friday, January 29, 2010 2:13 PM
  • there are only cities? village , highway, Mountains :) as an example.
    I use the words "city country shop" for better understand. I use other entitites :)
    Friday, January 29, 2010 3:20 PM