• Ajay Chakradhar
  • 63 Points
  • Member since 2015

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 4
I've added all these line of code in the Save() method to try to satisfy the "Modify the save() function to implement CRUD/FLS check on the Name field of the Encrypt_Decrypt__c object." requirement but nothing seems to pass it's check.  Anyone else run into this or have any ideas?

        if (!Schema.sObjectType.EnCrypt_Decrypt__c.fields.Name.isCreateable()) { 
            return NULL; 
        if (!Schema.sObjectType.EnCrypt_Decrypt__c.fields.Name.isUpdateable()) { 
            return NULL; 
        if (!Schema.sObjectType.EnCrypt_Decrypt__c.fields.Name.isAccessible()) { 
            return NULL; 

My code is given below. It displays error to me:
Error: Compile Error: Method does not exist or incorrect signature: [Schema.DescribeFieldResult].isCreatable() at line 44 column 25
public with sharing class CRUD_FLS_Create_Challenge{

    public Id newUser {get;set;}
    public List<Personnel__c> getUnReg() {
        unregisteredUsers = new List<Personnel__c>();
       List<Jouster__c> currentParticipants = [ select Participant_Name__r.Name from Jouster__c ];
       List<Personnel__c> currentPersonnel = [ select Id, Name, Favorite_Color__c, Castle__r.Name from Personnel__c limit 15];
       Boolean reg;
       for( Personnel__c p : currentPersonnel)
           reg = false;
           for(Jouster__c j : currentParticipants)
               if(j.Participant_Name__r.Name == p.Name) {
                   reg = true;
           if(reg == false)
       return unregisteredUsers;

    public Jouster__c newParticipant {get;set;}
    public List<Personnel__c> unregisteredUsers;
    public void register(){
        Personnel__c p = [select Name, Favorite_Color__c, Castle__r.Name from Personnel__c where Id =: newUser]; 
        if (!Schema.sObjectType.Jouster__c.fields.Participant_Name__c.isCreatable()) {
            if (!Schema.sObjectType.Jouster__c.fields.Color__c.isCreatable()) {
                if(!Schema.sObjectType.Jouster__c.fields.Favorite_Color__c.isCreatable()) {  
                    if(!Schema.sObjectType.Jouster__c.fields.Castle__c.isCreatable()) {   
                        ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR,'Error: Insufficient Access'));                 
        if([select id from Jouster__c where Participant_Name__r.Name =: p.Name] != null)
            insert new Jouster__c(Participant_Name__c=newUser, Color__c=p.Favorite_Color__c, Castle__c=p.Castle__c);
            ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR,'Error: Jouster already entered in Tournament'));
    public string[] getPermSets(){
        String[] permSetArray = new List<string>();
        PermSetArray.add('User with Read ONLY Access to the Jousters object'); // description of the needed permission set
        return permSetArray;


 Hi i have a very simple email publisher to replace the original one :->

<apex:page standardController="Case" >
  <apex:emailPublisher entityId="{!case.id}" 
So i remove the standard 'Answer Customer' action and add in my custom emailpublisher in. Now all my email message record feed doesn't have the 'Reply' & 'Reply to All' button. What have i missed out? Basically what I want to achieve is I want the sender to default as our support email instead of user's personal email.

With Answer Customer Action
User-added image

Without Answer Customer action (replaced with my custom email publisher)
User-added image

    I figured this would have been answered by doing a forum search but no luck:

How do I make a picklist field 'required' with a validation rule? 

I tried using both ISPICKVAL and CASE to detemrine when a picklist had not value selected, but either I get "invalid argument" (case) or no match (ISPICKVAL).

CASE example:

IF(  AND(Extension_Date__c <> null,   CASE(Extension_Reason__c, "Budget", false, "Org Change", false, true) ) , true, false)

ISPICKVAL example:

IF( AND(Extension_Date__c <> null,   ISPICKVAL(Extension_Reason__c, "" ***) ), true, false)

***[ also tried NULL, "NONE",etc]

Can this only be done using a NOT check on every picklist value? Seems cumbersome....   i.e.

IF AND(Extension_Date__c <> null,  NOT(ISPICKVAL(Extension_Reason__c, "Budget")), NOT(ISPICKVAL(Extension_Reason__c, "Org Change")) ), true, false)