locked
changing one field through another form RRS feed

  • Question

  • I create two custom forms with two fields for each one of them which are related so when the field's value of first form change the field's value of second form should be modified too.

    Since there is a 1-to-1 relation between these two form I can not use any kind of relation type of CRM to map these two fields.

    is it possible to create a 1-t-1 relation in CRM?

    if it is not, how can I solve my problem?

    thanks

     

    Tuesday, April 6, 2010 7:26 PM

Answers

  • Are the two forms related at all?  If so, you could create a workflow that pushed from form 1 to form 2 every time form 1 was changed.

    Tuesday, April 6, 2010 9:21 PM

All replies

  • An entity 1 to 1 relationship in a sense is itself. What is the purpose of what you are trying to achieve?
    MSCRM Bing'd - http://bingsoft.wordpress.com
    Tuesday, April 6, 2010 7:39 PM
    Moderator
  • Are the two forms related at all?  If so, you could create a workflow that pushed from form 1 to form 2 every time form 1 was changed.

    Tuesday, April 6, 2010 9:21 PM
  • CRM4 doesn't have 1-to-1 relationship out-of-box. But the behavior that you are expecting can be easily achieved through plug-in code. What you need to do is create a 1-to-N relationship between two entities, for instance, EntityA(1) and EntityB(N). 

    Then you can write some plug-in code to mimic 1-to-1 relationship. 

    1. Create message for EntityA, when a new record is created for EntityA, the plug-in should create a new record for EntityB. 
    2. Delete message for EntityA, when the record is deleted from EntityA, the plug-in should delete the corresponding record of EntityB. 
    3. Update message for EntityA, when EntityA's record is updated, the plug-in should update the corresponding record of EntityB. 

    A little tedious to implement, but not something very difficult. 

    Daniel Cai | http://danielcai.blogspot.com
    Wednesday, April 7, 2010 2:01 AM