zoukankan      html  css  js  c++  java
  • 027_System.VisualforceException: Read access denied for null, controller action methods may not execute [closed]

    https://salesforce.stackexchange.com/questions/123968/need-help-system-visualforceexception-read-access-denied-for-null-controlle

    System.VisualforceException: Read access denied for null, controller action methods may not execute [closed] // System.VisualforceException: 更新访问权限因为 Account 而被拒绝,控制器操作方法可能无法执行

    这类问题通常有几种情况;

    public without sharing class TestController {
        public Contact myCon {get ; set; }
        public String mobNumber {get;set;}
        public TestController() {
            myCon = [SELECT Id, Name, FirstName, MobilePhone FROM Contact WHERE Id =: '003N000000SDkc6'];
        mobNumber=myCon.MobilePhone ;
        }
    
        public void test(){
            System.debug('@@ ' + JSON.serialize(myCon));
            myCon.MobilePhone=mobNumber ;
            update myCon;
        }
    }
    <apex:page showHeader="true" sidebar="true" controller="TestController">
    <apex:form>
        <apex:inputText value="{!mobNumber}" />
        <apex:commandButton value="save" action="{!test}" />
    </apex:form>
    

     请不要使用{!myCon.MobilePhon}

    此刻,静下心来学习
  • 相关阅读:
    hdu 4864(2) 线段树
    hdu 4864
    Codeforces Round #256 (Div. 2)
    BestCoder Round #1 1001 && 1002 hdu 4857 4858
    [Groovy]Parse properties file in Groovy
    [Shell]Shell学习笔记之for
    [转]Groovy Goodness
    SoapUI Properties的使用
    [转]Groovy One Liners to Impress Your Friends
    How can I use wget in Windows
  • 原文地址:https://www.cnblogs.com/bandariFang/p/7000652.html
Copyright © 2011-2022 走看看