• Ajeet28aug
  • NEWBIE
  • 180 Points
  • Member since 2017
  • Salesforce Developer


  • Chatter
    Feed
  • 6
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 38
    Replies
What would I do without the community!? 
Please assist with the error for the trigger. Thank you! 

CLASS------->
public class RelatedTasks { 
    public static boolean taskmethod(){
        List<Task> tasks = [SELECT id, status from Task WHERE WhatId =:ApexPages.CurrentPage().getparameters().get('id') and status = 'Open'];
        boolean isOpen = false;
        for(Task t : tasks){        
            if(t.Status =='Open'){
                isOpen = true;           
            }
        } 
        return isOpen;
    }
}


TRIGGER------------>
trigger getOpenTasks on Case (before update) {
    for(Case c : Trigger.New){        
        If(RelatedTasks.taskmethod().isOpen==true){
            c.adderror('You cannot close a case with an open task');
        }
    }
}
ERROR---------> Variable does not exist: isOpen

THANK YOU!!!
Hello! Can someone help me figure out what is wrong with my Apex class? Thank you! 
public class RelatedTasks { 
    
    Public static void taskmethod(){List<Task> tasks = [SELECT id, status from Task WHERE WhatId =:ApexPages.CurrentPage().getparameters().get('id') and status = 'Open'];}
  
    for(Task t : tasks){        
        If(t.Status =='Open'){
            boolean isOpen = true;           
        }
        return isOpen;
    }                    
    }

and the error is the following:
Expecting '}' but was: 'for'


Thank you! 
I have configured SSO between salesforce and google following the step from here: 
Salesforce cloud application
https://support.google.com/a/answer/6194938?hl=en

From google end, SSO is now working.

However, when I go to Login Page for Salesforce, SSO does not initiate. Any Ideas on these? Every comment is highly appreciated.

Cheers!
Hi guys, 

I'm looking to try and build a custom button which creates a new record and also update a value in another record.
The object in question is a custom object called Payment. The purpose of this button is to allow users replace a payment with another payment. So if a user clicks on this button from within a payment record they will input the field values of the new payment record and the status value of the payment record from which the action was triggered will update to 'Replaced'. 
Is this possible through Quick Actions or Buttons and could anyone help me with it?
I Have a scenario where i need to create a record based on the multiselect field value . How can we loop over a mutliselect picklist field in a flow
Could someone help?  For the trailhead Creating a Lighnting Component challenge, why am I getting the message  
Challenge Not yet complete... here's what's wrong:  Could not find a Lightning Record Page named 'Account Record Page'.
User-added image

Thank you!

I have implemented SLDS ComboBox, And it's working great. But, I'm not able to set up keyboard interaction, with the list of available option. 
I mean, I should be able to select the option, by keyboard Up/down and Enter key
What would I do without the community!? 
Please assist with the error for the trigger. Thank you! 

CLASS------->
public class RelatedTasks { 
    public static boolean taskmethod(){
        List<Task> tasks = [SELECT id, status from Task WHERE WhatId =:ApexPages.CurrentPage().getparameters().get('id') and status = 'Open'];
        boolean isOpen = false;
        for(Task t : tasks){        
            if(t.Status =='Open'){
                isOpen = true;           
            }
        } 
        return isOpen;
    }
}


TRIGGER------------>
trigger getOpenTasks on Case (before update) {
    for(Case c : Trigger.New){        
        If(RelatedTasks.taskmethod().isOpen==true){
            c.adderror('You cannot close a case with an open task');
        }
    }
}
ERROR---------> Variable does not exist: isOpen

THANK YOU!!!
I'm building a flow and everything was going fine, I was saving my progress as I went along.  Then as I was building an Update Account step, one of my Account custom fields couldn't be found.  So I went back to my GetAccount step where I had already set it up to take the values from Account and assign them to variables in the flow.  When I opened the GetAccount step numerous fields were missing despite the fact that I saved my progress. When I attempted to re-add any of the fields to this step, they didn't show up in the field list.  

Is there a maximum number of fields you work with in Flows?  I'm the administrator for our Salesforce account.  Any help would be greatly appreciated.  Thanks
Hello! Can someone help me figure out what is wrong with my Apex class? Thank you! 
public class RelatedTasks { 
    
    Public static void taskmethod(){List<Task> tasks = [SELECT id, status from Task WHERE WhatId =:ApexPages.CurrentPage().getparameters().get('id') and status = 'Open'];}
  
    for(Task t : tasks){        
        If(t.Status =='Open'){
            boolean isOpen = true;           
        }
        return isOpen;
    }                    
    }

and the error is the following:
Expecting '}' but was: 'for'


Thank you! 
I have configured SSO between salesforce and google following the step from here: 
Salesforce cloud application
https://support.google.com/a/answer/6194938?hl=en

From google end, SSO is now working.

However, when I go to Login Page for Salesforce, SSO does not initiate. Any Ideas on these? Every comment is highly appreciated.

Cheers!
Hi guys,

I created an AutoLaunch flow in my sandbox, along with the Process Builder. It works perfectly in the sandbox but when I deploy it, it doesn't work. 
I have activated both the Flow and the Process Builder.

Anyone any ideas?
Hello community,

I completely understand that this has failed to deploy because the code coverage needs to be at least 75%. 2 things to say and ask please:

1. I sourced this on-line and it works well in my Sandbox (I realise why vs Production). I'm triggering in from a Process Builder Flow.
2. I would like to deploy this in Production. So if this can presumably be modified so that it will pass a) can someone here assist or b) should I source a developer elswehere to help or c) is there a reason that this should not be used?

I'm an admin - obviously not a developer.

All advice & guidance would be very welcome.

Thanks,
Steve
Apex ClassUser-added image
I Have a scenario where i need to create a record based on the multiselect field value . How can we loop over a mutliselect picklist field in a flow