No 'SendTo' field in document

When I enter this into a field.@If(@IsDocBeingSaved&ChangeNature=“Emergency”;@MailSend(Approvers;“”;“”;“Emergency Change Control”;“An Emergency Change Control has been created and requires your approval or has been modified.”;“”;[IncludeDoclink]);“”)

I receive this error.

No ‘SendTo’ field in document. Use ‘Forward’ or the ‘Actions’ menu instead.

I have many of these in databases created as R5 and they work ok. But now that we are V6.5.1 it gives me the error.

Can anyone help.

Thanks.

Subject: No ‘SendTo’ field in document

Did you confirm that the field “Approvers” exists on the form and is populated with a value at the time your code is executed?

Subject: RE: No ‘SendTo’ field in document

You were correct. I had to refresh the fields in the doc first to populate the Approvers field.It runs good now.

Thank you.