• Lourdes Montero
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 2
    Replies
So I have a flow so that users can create cases.

In my current flow Screen Input -> record create -> Thank you screen.
I want users to go back from the thank you screen and edit what they wrote without creating duplicate records, So I changed the order of operations.
It would be Screen Input -> thank you -> record create. The problem with this is that my Finish_location is not working.
I get the following error:  
User-added image



The Visualforce page code:
<apex:page controller="Quick_Case" >
    <flow:interview name="Quick_Case" interview="{!flowInstance}" finishLocation="{!FinishLocation}" buttonLocation="bottom">
        <apex:param name="Role" value="{!$User.UserRoleId}"/>
        <apex:param name="Department" value="{!$User.Department}"/>
        <apex:param name="CurrUserID" value="{!$User.Id}"/>
    </flow:interview>
</apex:page>






The Apex Class:

 
public class Quick_Case {

    Public Flow.Interview.Quick_Case flowInstance{get; set;}
    
    Public PageReference getFinishLocation(){
        
        String ID = '';
        if(flowInstance != null)
              ID = flowInstance.caseid;
        
        PageReference send = new PageReference('/' + ID);
        send.setRedirect(true);
        return send;
        
    }
    
}

 
I have a flow that creates a case with the info entered by the user. I want to add a default case team to it; however, it gives an error saying the user does not have create rights for the "CaseTeamTemplateRecord" object. In other words, the user does not have the rights to add case teams to the case. I cannot use assignment rules because flows do not trigger assignment rules. Process builder does not let me create CaseTeamTemplateRecord objects. I would only like to use an apex trigger as a last resort.

I think my solution would be to give rights to users to add case teams to cases... How could I do this?
We are using Flow to create cases, we need to assign these cases to different queues. Since FLows do no trigger Assignment rules, what other functionality can I use to make this happen without having to use code?
I have created a Flow that creates a "quick case". I have a VisualForce page that has a "Quick_Case" apex class as a controller that gets the Flow and returns the landing page once the case is submitted.The problem is that I am trying to deploy this in production, but I need code coverage for the apex class.

Visualforce Page:
<apex:page controller="Quick_Case" >
<flow:interview name="Quick_Case" interview="{!flowInstance}" finishLocation="{!FinishLocation}" buttonLocation="bottom">
    <apex:param name="Role" value="{!$User.UserRoleId}"/>
    <apex:param name="Department" value="{!$User.Department}"/>
    <apex:param name="CurrUserID" value="{!$User.Id}"/>
</flow:interview>

Apex Class:
public class Quick_Case {

Public Flow.Interview.Quick_Case flowInstance{get; set;}

Public PageReference getFinishLocation(){

    String ID = '';
    if(flowInstance != null)
            ID = flowInstance.caseid;

    PageReference send = new PageReference('/' + ID);
    send.setRedirect(true);
    return send;

}}

I just do not know how to make the test class in this situation. I appreciate any help.
We are using Flow to create cases, we need to assign these cases to different queues. Since FLows do no trigger Assignment rules, what other functionality can I use to make this happen without having to use code?