1

I'm getting the following error stating this is no field HasOptedOutOfFax for the Contact object, updating a contact using Javascript Remoting, I checked and that appears to be the correct field name:

[Error] Visualforce Remoting Exception: No such column 'HasOptedOutOfFax' on sobject of type Contact Object
    (anonymous function) (cordova, line 5180)
    error (VFRemote.js, line 116)
    (anonymous function) (VFRemote.js, line 132)
    fire (VFRemote.js, line 52)
    fireEvent (VFRemote.js, line 47)
    onProviderData (VFRemote.js, line 86)
    fire (VFRemote.js, line 52)
    fireEvent (VFRemote.js, line 47)
    onData (VFRemote.js, line 94)
    handleResponse (VFRemote.js, line 75)
    a (VFRemote.js, line 39)
    (anonymous function) (VFRemote.js, line 40)

EDIT: got this error again, seems to not be a one time random occurance.Here's the contact being saved from the javascript console:

AccountId: "001i000000Viql2AAB"
Birthdate: "1407456000000"
CreatedById: "005i0000001xZVvAAM"
CreatedDate: 1407334537000
Department: "Dept"
Description: "Some desc"
DoNotCall: true
Email: "aa@aa.com"
FirstName: "test"
HasOptedOutOfEmail: false
HasOptedOutOfFax: false
HomePhone: "4444444444"
Id: "003i000001B0DssAAF"
IsDeleted: false
LastModifiedById: "005i0000001xZVvAAM"
LastModifiedDate: 1407335320000
LastName: "iphone1"
LastReferencedDate: 1407354811000
LastViewedDate: 1407354811000
MailingStreet: "123 my street"
Name: "iphone1"
OwnerId: "005i0000001xZVvAAM"
RecordTypeId: "012i00000019wOfAAI"
SystemModstamp: 1407335320000
1

Perhaps for some historical reason, Salesforce defaults the "Contact Field-Level Security" for that field and a few others to not visible in all profiles.

If you want to use that field you need to edit the profile or permission set that the User you are making the request via is using to make that field visible and not read-only.

  • I'm not sure what it was, I was trying to recreate it later and I no longer got the error. If it doesn't pop back up in the next few days I'll remove the question, might have been a glitch in the matrix. – Phil B Jul 17 '14 at 13:18
  • @PhilB Wouldn't expect it to go away unless you change user/profile/permission set. If it comes back that would be the first place to look... – Keith C Jul 17 '14 at 13:23
  • it was all occurring under an admin user so I'm not sure that was it. – Phil B Jul 17 '14 at 13:27
  • 1
    @PhilB I've always assumed that the "System Adminstrator" can see everything, but in my orgs fields such as HasOptedOutOfFax are set to not visible in that profile too. – Keith C Jul 17 '14 at 13:33
  • interesting! not sure why it would work sometimes and not others then? I'll update with more info if it comes up again – Phil B Jul 17 '14 at 13:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.