Hi All,
I have difficulty in changing the field value in server side (i.e) database side. The field changed only in client side (i.e in the form - front end).
This is how it is working now:
On the Task entity, when user clicked on the "Mark Complete" button, the Activity Status changed to "Completed" and "Actual End Date" gets populated to the date when user clicked on mark complete button. Once this action is done, form becomes read-only.
My requirement is, once the activity status is completed, change the custom field "processing status" to "Completed". I wrote a java script and changed the status. It changed only on the client side, but not updated on the database.
Here is my Java scrip I wrote to chnage the processing status to "Completed".
function processingStatus()
{
var actualenddate = Xrm.Page.getAttribute("actualend").getValue();
if (actualenddate != null)
{
Xrm.Page.getAttribute("cf_processingstatus").setValue(979570001);
Xrm.Page.getAttribute(“cf_processingstatus”).setSubmitMode("always");
Xrm.Page.getControl("cf_processingstatus").setVisible(true);
}
}
Here is the screen shot of the form.
Before User click "Mark Complete":
After User clicked "Mark Complete"Button:
I'm happy that the processing status changed to "Completed", but when I did an advanced find to see, I didn't get any results and then I realized it just updated only on the client side and not on the server side. I found this, as in the other form, it is still in pending status.
Anyone help is much appreciated here.
Many Thanks in advance,