• Julio Hernandez
  • NEWBIE
  • 10 Points
  • Member since 2015
  • UMass Lowell

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 7
    Replies
Hi,

I want to change the size of the text-box field and drop-down list field for a flow. I changed the text size on the flow builder so I am wondering if the text-box field size can also be changed there. I tried changing the size of the values in the drop-down list but that did not work.

I have this flow on a visual force page so the CSS tags, if those even exisit, would work too.

Thanks,
-Julio Hernandez
Hi,

In the past I created a VF page that had 4 buttons on it to do 4 actions. Take Ownership...Flag a Case...etc. When I put the VF page on as a lightning component the buttons do not work. The buttons are controlled with Javascript in the VF code.
I am assuming that I have to redesign the page to be a lightning component. This isn't a question on how to do, I am wondering what to do to get these buttons to work in the Lightning Experience.

Thanks,
-Julio Hernandez
Hi,

I have a flow that I want to populate with a URL ex: 

https://umasslowell--umlfullsbx.cs53.my.salesforce.com/flow/ADM_Call_Center_Intake?First_Name=test

I put the varible's unique ID after the question mark and I am having no luck populating the field. Any suggestions?

Thanks,
-Julio Hernandez
Hi,

I created an apex class that creates a task. Im wondering how I can change that to 'Log a Call'. The reason I want to do this is because in our feed view in cases there is a 'Log a Call' section and a 'Task and Activity' section. I want to populate the Log section rather than the Task section. 

Thanks,
-Julio Hernandez
Hi,

I created an APEX class that creates a Flow plug-in. I followed the documentation online, I'll post link below. But I cant seem to be able to write a test class that will fully cover the APEX class.

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_process_plugin.htm


CLASS
global class flowTask implements Process.Plugin{
    
    global Process.PluginResult invoke(Process.PluginRequest request){
        
        string taskCase = (String) request.inputParameters.get('CaseId');
        date taskDate = date.today();
        String description = (String) request.inputParameters.get('subject');
        
        Task myTask = new Task();
        myTask.ActivityDate = taskDate;
		myTask.Description = description;
        myTask.Status = 'Completed';
        myTask.WhatId = taskCase;
        
        insert myTask;
        
        Map<String, Object> result = new Map<String, Object>();
        return new Process.PluginResult(result);
    }
    
    global Process.PluginDescribeResult describe(){
        Process.PluginDescribeResult result = new Process.PluginDescribeResult();
        result.Name = 'flowtaskpluggin';
        result.Tag = 'task';
        result.inputParameters = new List<Process.PluginDescribeResult.inputParameter>{
            new Process.PluginDescribeResult.InputParameter('subject', Process.PluginDescribeResult.ParameterType.STRING, true),
            new Process.PluginDescribeResult.InputParameter('CaseId', Process.PluginDescribeResult.ParameterType.STRING, true)   
        };
            result.outputParameters = new List<Process.PluginDescribeResult.outputParameter>{
                
            };
            return result;
    }

}


TEST
@isTest
private class flowTaskTest{
    
    static testmethod void flowTaskTest(){
        
        flowTask plugin = new flowTask();
        Map<String, Object> inputParams = new Map<String, Object>();
        string taskNum = '50063000003AEik';		//50063000003AEik-SBX | 500o000000GCryb-PROD
        string taskSub = 'Test Class';
        
        inputParams.put('subject', taskSub);
        inputParams.put('CaseId', taskNum);
        
        Process.PluginRequest request = new Process.PluginRequest(inputParams);
        
        plugin.invoke(request);
    }

}


Im not sure how to test the describe function in the APEX code. Any information is a helpful. 

Thanks,
-Julio Hernandez
Hi, 

I created an APEX controller which in theory should pull the data given by the report. Unfortunatly I dont think it's pulling the report at all. Here is the Controller Code.
 
public class reportData{


private static Integer LOWER = 4;
    private static Integer MID = 8;

    public String gaugeColor {
        get;
        set;
    }

    public class GaugeData {
        public String name {
            get;
            set;
        }

        public Integer size {
            get;
            set;
        }

        public GaugeData(String name, Integer size) {
            this.name = name;
            this.size = size;
        }
    }

    public List<GaugeData> data {
        get;
        set;
    }

    public reportData() {
        this.data = new List<GaugeData>();

        List<Report> reportList = [
            select Id, DeveloperName 
            from Report
            where DeveloperName = 'Active_Solution_Hawks'
        ];
        String reportId = (String)reportList.get(0).get('Id');


        Reports.ReportResults results = Reports.ReportManager.runReport(reportId, true);
        Reports.Dimension dim = results.getGroupingsDown();

        Integer numberOfCases = 0;

        for (Reports.GroupingValue groupingVal : dim.getGroupings()) {
            String factMapKey = groupingVal.getKey() + '!T';
            Reports.ReportFactWithDetails factDetails = (Reports.ReportFactWithDetails)results.getFactMap().get(factMapKey);
            Reports.SummaryValue sumVal = factDetails.getAggregates()[0];
            numberOfCases += Integer.valueOf(sumVal.getLabel());
        }

        this.data.add(new GaugeData('Cases', numberOfCases ));

        if (numberOfCases < LOWER) {
            this.gaugeColor = '#093, #ddd';
        } else if (numberOfCases < MID) {
            this.gaugeColor = '#ff6, #ddd';
        } else {
            this.gaugeColor = '#c00, #ddd';
        }
    }
}

I know it doesnt work because numberOfCases stays at zero even though the report has data in it. 
Hi,

I am try to set up single sign-on for my university's students to login to a community and post questions to each other. I'm having a hard time setting up single sign-on for them because SAML Identity Type is required to be filled in and all the options are related to the User object. Do I have to set up each Student as a user?

Thanks,
-Julio Hernandez
Hi All,

Hope everyone is doing well before the holidays.

I am having an issue trying to create a VF page to use as a Quick Action. I want to use Apex:inputfield to have a lookup field of our users so when our case managers are in a case they can use the quick action button to assign the case quickly to another user. My could works up until the part where I try to get the value of the Apex:inputfield, the user's name. Any suggestions or arrows pointing in the right direction will be greatly appreciated.
 
<apex:page docType="html-5.0" standardController="Case" title="Case Assign">

    <apex:remoteObjects >
        <apex:remoteObjectModel name="Case" fields="Id,OwnerId,Status"/>
    </apex:remoteObjects>
    <script src ="/soap/ajax/35.0/connection.js"></script>
    
    <apex:form id="form">
        <apex:inputField value="{!case.ownerID}" id="newOwner"/>          
    </apex:form>
    <div class="mypage">    
        <button onclick="assignOwnership()">Assign Ownership</button>    
    </div>
    
    <script>
        function assignOwnership() {
            var jq$ = jQuery.noConflict();           
            var newOwn = jQuery('[id$=newOwner]').val();
            alert(newOwn);
            var caseObj = new sforce.SObject("Case"); 
            caseObj.Id = "{!Case.Id}"; 
            caseObj.OwnerId = newOwn; 
            caseObj.Status = 'In Progress'; 
            
            var result = sforce.connection.update([caseObj]); 

            if (result[0].success=='false') { 
            alert(result[0].errors.message); 
            } else { 
            location.reload(true); 
            }
        }
        
        

     </script>
     
     
</apex:page>

 
Hi,

I want to change the size of the text-box field and drop-down list field for a flow. I changed the text size on the flow builder so I am wondering if the text-box field size can also be changed there. I tried changing the size of the values in the drop-down list but that did not work.

I have this flow on a visual force page so the CSS tags, if those even exisit, would work too.

Thanks,
-Julio Hernandez
Hi,

In the past I created a VF page that had 4 buttons on it to do 4 actions. Take Ownership...Flag a Case...etc. When I put the VF page on as a lightning component the buttons do not work. The buttons are controlled with Javascript in the VF code.
I am assuming that I have to redesign the page to be a lightning component. This isn't a question on how to do, I am wondering what to do to get these buttons to work in the Lightning Experience.

Thanks,
-Julio Hernandez
Hi,

I have a flow that I want to populate with a URL ex: 

https://umasslowell--umlfullsbx.cs53.my.salesforce.com/flow/ADM_Call_Center_Intake?First_Name=test

I put the varible's unique ID after the question mark and I am having no luck populating the field. Any suggestions?

Thanks,
-Julio Hernandez
Hi,

I created an APEX class that creates a Flow plug-in. I followed the documentation online, I'll post link below. But I cant seem to be able to write a test class that will fully cover the APEX class.

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_process_plugin.htm


CLASS
global class flowTask implements Process.Plugin{
    
    global Process.PluginResult invoke(Process.PluginRequest request){
        
        string taskCase = (String) request.inputParameters.get('CaseId');
        date taskDate = date.today();
        String description = (String) request.inputParameters.get('subject');
        
        Task myTask = new Task();
        myTask.ActivityDate = taskDate;
		myTask.Description = description;
        myTask.Status = 'Completed';
        myTask.WhatId = taskCase;
        
        insert myTask;
        
        Map<String, Object> result = new Map<String, Object>();
        return new Process.PluginResult(result);
    }
    
    global Process.PluginDescribeResult describe(){
        Process.PluginDescribeResult result = new Process.PluginDescribeResult();
        result.Name = 'flowtaskpluggin';
        result.Tag = 'task';
        result.inputParameters = new List<Process.PluginDescribeResult.inputParameter>{
            new Process.PluginDescribeResult.InputParameter('subject', Process.PluginDescribeResult.ParameterType.STRING, true),
            new Process.PluginDescribeResult.InputParameter('CaseId', Process.PluginDescribeResult.ParameterType.STRING, true)   
        };
            result.outputParameters = new List<Process.PluginDescribeResult.outputParameter>{
                
            };
            return result;
    }

}


TEST
@isTest
private class flowTaskTest{
    
    static testmethod void flowTaskTest(){
        
        flowTask plugin = new flowTask();
        Map<String, Object> inputParams = new Map<String, Object>();
        string taskNum = '50063000003AEik';		//50063000003AEik-SBX | 500o000000GCryb-PROD
        string taskSub = 'Test Class';
        
        inputParams.put('subject', taskSub);
        inputParams.put('CaseId', taskNum);
        
        Process.PluginRequest request = new Process.PluginRequest(inputParams);
        
        plugin.invoke(request);
    }

}


Im not sure how to test the describe function in the APEX code. Any information is a helpful. 

Thanks,
-Julio Hernandez
Hi All,

Hope everyone is doing well before the holidays.

I am having an issue trying to create a VF page to use as a Quick Action. I want to use Apex:inputfield to have a lookup field of our users so when our case managers are in a case they can use the quick action button to assign the case quickly to another user. My could works up until the part where I try to get the value of the Apex:inputfield, the user's name. Any suggestions or arrows pointing in the right direction will be greatly appreciated.
 
<apex:page docType="html-5.0" standardController="Case" title="Case Assign">

    <apex:remoteObjects >
        <apex:remoteObjectModel name="Case" fields="Id,OwnerId,Status"/>
    </apex:remoteObjects>
    <script src ="/soap/ajax/35.0/connection.js"></script>
    
    <apex:form id="form">
        <apex:inputField value="{!case.ownerID}" id="newOwner"/>          
    </apex:form>
    <div class="mypage">    
        <button onclick="assignOwnership()">Assign Ownership</button>    
    </div>
    
    <script>
        function assignOwnership() {
            var jq$ = jQuery.noConflict();           
            var newOwn = jQuery('[id$=newOwner]').val();
            alert(newOwn);
            var caseObj = new sforce.SObject("Case"); 
            caseObj.Id = "{!Case.Id}"; 
            caseObj.OwnerId = newOwn; 
            caseObj.Status = 'In Progress'; 
            
            var result = sforce.connection.update([caseObj]); 

            if (result[0].success=='false') { 
            alert(result[0].errors.message); 
            } else { 
            location.reload(true); 
            }
        }
        
        

     </script>
     
     
</apex:page>

 
I need to understand the differences between 'Log A Call' and 'New Task'.

When I do 'Log A Call' it actually creates a 'Task' record.
When I do 'New Task' it also creates a 'Task' record.

When on a case screen and I click 'Tasks and Events' I see only the item I created as 'New Task. When I click on 'Call Logs' I see only the item I created as 'Log A Call'.

Both of these items are actual task records but they are different in some way such that they only show on their respective lists when selecting Call Logs or Tasks and Events.

So, I used a SOQL statement to show me all task records for a case and of course, I get both records. Life is good. My question is, which field in the task record differentiates one as a call log and the other as a task. I've printed all the fields and their values and the 2 records appear to be identical with the exception of the Subject and Description/Comment.

Any ideas how to determine the differences, or more importantly, I'm using a C# WSDL service to write records and I would like to know how to insert one task as a task and one task as a call log.

Thanks.
  • March 18, 2014
  • Like
  • 0