Link to home
Start Free TrialLog in
Avatar of abaines
abainesFlag for Ireland

asked on

How can I make a change in one entity when a change has been made in another entity?

Hi All,

This is the scenario that I am trying to code. If I tick a 'decommissioned' tick box in our PC entity, it records the date and disables that PC record, however I would like to code it so that it also make a change in an entity linked by a relationship. For example our PC entity and IP number entities are linked. If the PC is no longer used I would like the 'machine name' text field in the IP entity to change from the PCs ID number to 'unused'. So I can free up IP numbers as the machines are removed from the network.

I have tried using the postcodeLookup example that can data from one entity into another but I haven't been able to apply it to this scenario.

Any help is appreciated.
Tks.
Avatar of Jeff Wight
Jeff Wight
Flag of United States of America image

Take a look at this open thread for a similar case:

https://www.experts-exchange.com/questions/26485511/Editing-field-in-different-entity-using-ONSAVE-event-in-CRM-4-0.html?cid=1752

From what you describe, the same solution would work for you.
ASKER CERTIFIED SOLUTION
Avatar of Feridun Kadir
Feridun Kadir
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of abaines

ASKER

Dev errors were on. The error message isn't the usual CRM error message in it's own browser window. The only error message I get is the smaller 'MS Dynamics CRM has encountered an error', Send - Don't Send.

Avatar of abaines

ASKER

Hi feridun

I got that sample code working now and I tailored it to do what I wanted. I'll accept your last comment as the answer becuase I got the code from you reply to question;
https://www.experts-exchange.com/questions/26485511/Editing-field-in-different-entity-using-ONSAVE-event-in-CRM-4-0.html?cid=1752

Tks
Avatar of abaines

ASKER

Answer in the form of sample code given be feridun as a reply to another question. See last comment.