0

I have a ribbon button on the case entity that updates a single two-option field on the form via javascript. When this is used on a case that has been resolved/closed it returns an error as the form is now read only.

Is there a way in javascript that I could get it to re-activate the form, change the field and then put it back to the way it was before? I have tried to force the change on the form but even if i manage to make it appear that you can save it, it will return the error as the form record is still counted as de-activated, even though you can change the fields

Thanks

jimminybob
  • 1,392
  • 2
  • 24
  • 60

1 Answers1

2

You should be able to use a SOAP call for this, its a little involved, I would suggest starting here. You have to generate XML that represents the request, the link provides some tools to do this.

I believe you will need to issue JavaScript versions of SetStateRequest (to open) and CloseIncidentRequest (to close).

On the other hand, which is a different approach entirely, is to disable the button when the record is deactivated, then users have to manually renable the record make the change and close again. This is closer to 'working with the system' which I have touched upon here, its a different situation but the principle still applies.

Community
  • 1
  • 1
James Wood
  • 17,286
  • 4
  • 46
  • 89