Hi , I have two fields in contact entity named Last Appointment Date and Next Appointment Date. I want to populate this field with values from the appointment entity when new appointment is created. When i create an appointment i will select a contact name the related contact should be update with the values in the appointment fields. can any one help??
A:
What part are you having problems with?
It sounds like you should be able to use standard variable assignment to do this. If appointments must always have a contact, you could perhaps do this in the appointment's constructor:
function Appointment(contact)
{
...
contact.nextAppointmentDate = this.date;
}
otherwise, you could do this in the code that creates the appointment:
Appointment appointment = new Appointment(date);
contact.nextAppointmentDate = appointment.date;
I'm not really sure whether you're asking about best practices here in general, or about the specific wiring, or if there's an additional complexity that you haven't mentioned. Is there a reason why you can't simply update the fields?
Andrzej Doyle
2010-06-24 12:22:44
i am using CRM in that i want this action to happen.I want to use java script in onsave event of the form
Mathan
2010-06-24 13:41:52
@Andrzej: You may want to manually copy this answer to his newer version of the question: http://stackoverflow.com/questions/3110639/javascript-to-update-values-in-mscrm I don't know which one will get closed.
T.J. Crowder
2010-06-24 14:18:41