• Lokesh Kumar
  • SMARTIE
  • 1963 Points
  • Member since 2016
  • Senior Salesforce Consultant
  • Google (Contract)


  • Chatter
    Feed
  • 58
    Best Answers
  • 3
    Likes Received
  • 1
    Likes Given
  • 13
    Questions
  • 524
    Replies
Need to add Generate new password and notify user immediately check box  in Visualforce page? kindly help me out
 
In org , I'm not able to see the login button suddenly eventhough "Admin can login as any user" checkbox is enabled ? what might be the reason.

Hi, Thanks for looking into my question.  I'd like to build a new feature that allows the Salesmen to enter very detailed lost reasons. such as:

----Example:
Opportunity stage changes to Closed Lost
-> Lost Reason Category: Low Flexibility
-> Lost reason sub categories for Low Flexibility : Lack of custom fields
-> On which page did you need the custom fields? : Sign-up page
-> How did you want to use the custom fields?: Ask custom questions before signing up
----

What would be the best way to implement it?
I was thinking about setting up a custom object called 'Lost Reasons' but even then I couldn't think of a way to have 5 level of picklists.  I could create many custom picklists and use visualforce page to change the following picklist based on the previous picklist selection.  However, it wouldn't have been able to be summaried in the Related List on Opportunity page. 

I am soo lost

Please share your wisdom

Thanks and kind regards,

Hello everyone,

Is there a possibility to make 'set by record' as default in notes sharing settings?
If so, please let me know the solution, it would be very helpful.

Thank You,
Sindhu
Hi,
I have a simple formula I need help with for a validation rule. The criteria is IF Course__r.Name CONTAINS 'ICT' or 'Maths' or 'English' AND RecordTypeId not equal to ‘0120O000000tbh0QAA’ THEN THE VALIDATION RULE SHOULD FIRE

I've tried a couple ways but to no avail.

Any help is much appreciated :)
Many Thanks,
Natasha 
Hello There,

I have a Map i.e., Map<String, List<Account>> emailAccListMap
I am trying to access the account field from the above Map by saying emailAccListMap.get(String).Name, but this doesn't work.

Can anyone help?

Thanks
public class Cus_Inv_Exmp1 {
    public static void callMe(List<APEX_Customer__c> customers )
    {  
        List<APEX_Invoice__c> InvoiceList=new List<APEX_Invoice__c>();
        for(APEX_Customer__c objCust:customers)
        {   
            if(objCust.APEX_Customer_Status__c=='Active')
            {
                APEX_Invoice__c objInvoice=new APEX_Invoice__c();
                objInvoice.APEX_Status__c='Active';
                objInvoice.APEX_Description__c='Recored created through trigger';
                objInvoice.APEX_Customer__c=objCust.id;
                InvoiceList.add(objInvoice);
                
            }
            
        }
      Insert  InvoiceList;//DML
    }
}


Callout for Trigger :

trigger Cus_Inv_Exmp1 on APEX_Customer__c (after update)
{

     Cus_Inv_Exmp1.callMe(Trigger.new);   
}
Hi,

I have requirement to schedule the below code on the third friday of every month, which i can do through "Schedule apex" option in UI itself.
 
global class ApexScheduledClass Implements Schedulable
{
   global void execute(SchedulableContext sc)
        {
        if(/*Today is not last working day*/) {
            sendmail();
           // ApexScheduledClass.Schedulable.execute(System.param1);
        } else if (/*Today is the last working day*/) {
            sendremaindermail();
        }
    }
    
    public void sendmail()
    {
        Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
        string [] toaddress= New string[]{'durairaj1696@gmail.com'};
        email.setSubject('Testing Apex Scheduler-Subject');
        email.setPlainTextBody('Testing Apex Scheduler-Body');
        email.setToAddresses(toaddress);
        Messaging.sendEmail(New Messaging.SingleEmailMessage[]{email});
    }
    
    public void sendremaindermail()
    {
       Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
       string [] toaddress= New string[]{'durairaj1696@gmail.com'};
       email.setSubject('Testing Apex Scheduler-Subject');
       email.setPlainTextBody('Testing Apex Scheduler-Body');
       email.setToAddresses(toaddress);
       Messaging.sendEmail(New Messaging.SingleEmailMessage[]{email});
    }
}

Now, when it runs on third friday of every month, it must again schedule itself to run after 5 days from then.

How can i do that. Any suggestion is welcome. Thanks in advance.

Thanks,
Durairaj


 
Hi,
I'm using the following formula to set a date and time for another field:
DATETIMEVALUE(TEXT(DATEVALUE([Session__c].Course__c.Knowledge_Module_Session_1__c)+266) +” 09:00:00")
Regardless of time changes and time zones, I need to set the time to be 09:00:00 everytime. Is there any way of setting the time as 09:00:00 and forcing it to stay like that?

Many Thanks,
Natasha 
 
I have inline VF page on Account page layout. This inline page may or maynot have records and even if records are present, it can be very low in number. When the number of records are none/less, it is showing white space at the botton of this inline page which doesnt look good. How to remove this white space below the inline page?
Hi Expert,

I have a sendbox details, i want to create a new object in salesforce , but "New Custom Object" button is not available on my version. 


User-added image

Please suggest , how to create a new Custom object button
Thanks 
Mukesh
Hello Everyone,

I am trying to create pdf file in salesforce. But I have image and need to put this image with zero margin in the left side . 

 @page {
            margin-left:  0cm;
            margin-right: 2.54cm;
}

I wrote this css style , it doesn't work.

Thank you .
I created a field that is dependent on a picklist. How do I make it required and show an error message when it is enabled but left blank? 
...and it sure looks like it's there to me.

I'm doing the tutorial on REST callouts, and the exit test calls for making a class called "AnimalLocator." I created the class, wrote the code for it per the instructions, and ran the tests. When check the challenge, though, I get an error message "Challenge Not yet complete... here's what's wrong: 
No Apex class named 'AnimalLocator' was found."

I've double checked my spelling and capitalization. What rookie mistake might I be making here?

Thanks.
 
Hi all, 

I made few changes to the  one of the Apex classes in UAT, I want to move same class into Production( already same class exist in Production) by useing change sets.

is it like same process adding classes and testclasses into change sets then validation and deploy?? 
why because same test class already exist in prodcution, so do i need to add again test class to the chang set??
which option is suitable during deployment to run test classes among four?? ..i dont want to run all the test classes in prodcution at this case  
Is it going to overwrite the exist class?? 
is there any possible errors can occur during deployment in this case?? 

Thanks in advance.
Hi Team,

I want to get opportunities that are related to case as a related list using VF page.

Can anyone help to fix this?

Thanks & Regards,
Karthikeyan Chandran
I have a trigger on the Opportunity that creates records on a custom object called the Opportunity_Revenue__c. It takes the revenue from the Opportunity and spreads it out over the quarters during the length of the deal. It works fine for insert triggers, I need to have the ability to let users re-create based on a changing contract length / deal length. 

So when the record is updated I want to delete all the records in the custom object Opportunity_Revenue__c that are related to the Opportunity and then run the insert code to create the new records for the Opportunity_Revenue__c object. But it is doubling the records because once it deletes the old records it see trigger as an update and an insert.

Can you help or suggest what I might do?

Here is the code:
 
public class OpportunityRevenueTrigger2 {

    
    public static void updateOpportuntityRev(List<Opportunity> trig){
         List<ID> opprtnyId = new List<ID>();
         Decimal totRev;
         Decimal totAllottedRev;
         Decimal mRev;
         
         for(Opportunity opp4: trig){
            if(Opp4.Auto_Generate_Quarterly_Forecast__c == 'Yes'){
                opprtnyId.add(opp4.id);
            }
         List<Opportunity_Revenue__c> deleteOR = [SELECT id
                                                 FROM Opportunity_Revenue__c 
                                                 WHERE Opportunity__c in: opprtnyID];
         
        if(deleteOR.size() != 0){
           Delete deleteOR;
         }
        
        List<Opportunity_Revenue__c> oppr = new List<Opportunity_Revenue__c>();
        for(Opportunity opp : trig){
             
             if(opp.amount > 0 && opp.contract_length_Months__c > 0 
               && opp.Auto_Generate_Quarterly_Forecast__c == 'Yes' ){
                   Date sDate = opp.CloseDate;
                   Integer period = opp.Contract_Length_Months__c.intValue();
                   Integer period2 = period / 3;
                   totRev = opp.Amount;
                   mRev = totRev.divide(period2, 2);
                   for(Integer i = 1; i <= period2; i++) {
                   Opportunity_Revenue__c oppr2 = new Opportunity_Revenue__c();
                   oppr2.Account__c = opp.AccountId;
                   oppr2.Opportunity__c = opp.id;
                   System.debug('i '+ i);
                   oppr2.ProjectedRevenue__c = mRev;
                   oppr2.Month__c = sDate;
                       if(sDate.Month()== 1 || sDate.month()==2 || sDate.month() ==3){
                           oppr2.Quarter__c =  'Quarter 1, '+string.valueOf(sDate.Year());   
                       } else if (sDate.Month()== 4 || sDate.month()== 5 || sDate.month() == 6){
                           oppr2.Quarter__c =  'Quarter 2, '+string.valueOf(sDate.Year());
                       } else if (sDate.Month()== 7 || sDate.month()== 8 || sDate.month() == 9){
                           oppr2.Quarter__c =  'Quarter 3, '+string.valueOf(sDate.Year());
                       } else if (sDate.Month()== 10 || sDate.month()==11 || sDate.month() ==12){
                           oppr2.Quarter__c =  'Quarter 4, '+string.valueOf(sDate.Year());
                       }
                   
                   oppr.add(oppr2);
                   sDate = sDate.addMonths(3);
                   }
                  
        
              }
        }
        insert oppr;

    }
}
}
 
trigger OpportunityRevenueTrigger on Opportunity (after insert, after update) {
  
        
        OpportunityRevenueTrigger2.updateOpportuntityRev(trigger.new);
        
 
  }

 
Hello Developers!
I am trying to write trigger on opportunity which would sum the Amount field on Account.
This might be possiable via standard but I am trying to have similar trigger on different set of object and solving this would solve the other one as well.
Trigger:
trigger AmountRollup on Opportunity(After insert, After update, After delete, After undelete){
    
    Set<ID> accountIds = New Set<ID>();
    
    If(Trigger.IsInsert || Trigger.IsUpdate || Trigger.IsUndelete){
        For(Opportunity opp: Trigger.New){
            accountIds.add(opp.AccountID);
        }
    }
    If(Trigger.IsDelete){
        For(Opportunity opp: Trigger.Old){
            accountIds.add(opp.AccountID);
        }
    }
    
    List<Account> AccountListToUpdate = New List<Account>();
    Double AmountTotal = 0.00;
    
    
    For(Account a : [Select id, total_opportunity_amount__c, 
                                (Select id, Amount FROM opportunities) 
                                FROM Account WHERE ID = :accountIds])
    {
         For(Integer I = 0; I < a.opportunities.size(); I++)
         {
             AmountTotal += a.opportunities.Amount; // Here I am trying add all amount sum into AmountTotal
             a.total_opportunity_amount__c = AmountTotal;
             AccountListToUpdate.add(a);
         }
                                
    }
    try{
    update AccountListToUpdate;
    }
    catch(Exception E){
        system.debug('Error thrown is: ' + E.getMessage());
    }
}

Thank you for the help!
We are trying to install app from appexchange in sandbox and getting [Exception, DomainNotPropagated] error.

An error has occurred in the following section: [Exception, DomainNotPropagated]. Salesforce.com has been notified of this error.

How do we resolve? We have been on a custom domain for over a year in sandbox and production.
<apex:page standardcontroller="comingpeople__c"   sidebar="false" showHeader="false">
<apex:form >

<apex:pageBlock >
<apex:pageBlockSection title="OUTING PLAN">
<apex:inputField value="{!comingpeople__c.Employee_name__c}" /><br/>
<apex:inputField value="{!comingpeople__c.GID__c}" /><br/>
<apex:inputField value="{!comingpeople__c.coming_or_not__c}" /><br/>
<apex:inputField value="{!comingpeople__c.Transportation__c}" /><br/>
<apex:inputField value="{!comingpeople__c.Venue__c}" /><br/>
</apex:pageBlockSection>

<apex:commandButton value="save" action="{!save}"  />

</apex:pageBlock>
</apex:form>
</apex:page>
Hello Geeks,

Wants to know more about how we can whitelist IP's at Profile Level instead of manually.
I want to know is there a way to add IP's Programmatically through API's.

Any suggestion appreciated 

Thanks
Lokesh
Hello Geeks,

we have a requirement to do a call out whenever any deployment is happing in the Org,

Why Is it required?

We want to hit an URL if the deployment components having particular component only in Apex Class. URL is for executing the test cases in the third party system. 

So is there any way to look into the deployment Components programmatically. (API's)

Any Help much appreciated.

Thanks
Lokesh
I am trying to pass Set of Ids in the where clause at the time of setEndPoint URL for more PFB.
Map<ID,ApexClass> apexclassName 		= new Map<Id,ApexClass>([select id,name from ApexClass where NamespacePrefix = null]);
        Map<ID,ApexTrigger> apexTriggerName 	= new Map<ID,ApexTrigger>([select id,name from ApexTrigger where NamespacePrefix = null]);
        Set<ID> apexandTriggerID = new Set<Id>();
        apexandTriggerID.addAll(apexTriggerName.keySet());
        apexandTriggerID.addAll(apexclassName.keySet());
        HttpRequest req = new HttpRequest();
        req.setHeader('Authorization', 'Bearer ' + UserInfo.getSessionID());
        req.setHeader('Content-Type', 'application/json');
        req.setEndpoint(URL.getSalesforceBaseURL().toExternalForm()+'/services/data/v37.0/tooling/query/?q=Select+ApexClassorTriggerId,NumLinesCovered,NumLinesUncovered,Coverage+from+ApexCodeCoverageAggregate+where+ApexClassorTriggerId+IN+(+'+apexandTriggerID+')');
        req.setMethod('GET');
        Http h = new Http();
        HttpResponse res = h.send(req);

the value which is getting assigned is like.

21:08:27:041 USER_DEBUG [12]|DEBUG|***System.HttpRequest[Endpoint=https://informatica--Lokesh.cs41.my.salesforce.com/services/data/v37.0/tooling/query/?q=Select+ApexClassorTriggerId,NumLinesCovered,NumLinesUncovered,Coverage+from+ApexCodeCoverageAggregate+where+ApexClassorTriggerId+IN+(+{01p550000001F7QAAU, 01p550000001F7RAAU, 01p550000001F7SAAU, 01p550000001F7TAAU, 01p550000001F7UAAU, 01p550000001F7VAAU, 01p550000001F7WAAU, 01p550000001F7XAAU, 01p550000001F7YAAU, 01p550000001F7ZAAU, ...}), Method=GET]
 
can anyone help me how to pass return false; in the ng-click event while opening a PrimaryTab using salesforce service cloud console. This is to stop refreshing the main page after clicking on a link.
 
<tr ng-repeat="case in Caseinformation|orderBy:sortType:sortReverse |      filter:query " style="height:1px;" class="data-row">          
     <td style="text-align:left;"><a ng-href="/{{case.caseId}}" ng-click= "openPrimaryCaseTab(case.caseId,case.caseNumber);return false">{{case.CaseNumber}}</a></td>

$scope.openPrimaryCaseTab = function (recordID,caseNumber) {
    alert('open primary tab'+recordID);
    sforce.console.openPrimaryTab(null,recordID,true,caseNumber); 
    }



 
Not able to pass this Challenge PFB screen shot.
My Save Method code.

 
public PageReference save(){
        PageReference savePage;
        if (Schema.SObjectType.Resource_Type__c.isCreateable()){
            try{

                insert rtype;

                String completion = ApexPages.currentPage().getParameters().get('finishURL');
                system.debug('First$'+completion);
        if(completion.startsWith('/')){
        system.debug('Second$'+completion);
            completion.replaceFirst('/','');
system.debug('Third$'+completion);
        }
        savePage = new PageReference('/'+completion);
        
        savePage.setRedirect(true);
        return savePage;
            

            }catch (exception e){
                ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, 'Unable to update requisitions.  Exception: ' + e.getMessage()));
                return null;
            } 
        }else{
            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, 'You do not have permission to update requisitions'));
            return null;
        }
    }


User-added image 
can anyone please help me here I am not able to solve this challenge.

User-added image
Can somebody please help me out here how to measure based on the sum of # instead of a count of rows or sum of the amount because on my case # is not appearing on the creating lens window Thanks in advance. PFB more details.

User-added image
can somebody help me her am not able to pass this module stuck in the last challenge for more details PFA.

User-added image

User-added image

 
We have a requirement to get the overall test class coverage and individual classes there in salesforce production org. automatically based on time interval. The challenge is how to execute it programmatically and get the latest coverage? 
 Thanks in Advance 
-Lokesh
Create a dashboard named Sales Focus and add the reports you set up earlier in this module.
Add a component based on the Upgrades (Last Month) report as a gauge component.
Add a component based on the Key Accounts report as a horizontal bar chart component.
Check challenge


Challenge Not yet complete... here's what's wrong: 
There was an unexpected error while verifying this challenge.
Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: LNEWIXXM

User-added image
I am quering a name from the user object by providing in text box and displaying as dynamic record choice. but if the provided user is not exist i want to display a message that the requested user in not present. how to handle no result in visual flow dynamic record choice
currently we are running via manual clicking on the batches. could you please suggest an option to automate apttus job.

these are the apttus batch jobs update.
Requirement:
I want to create an app which update the user information like profile, email,license etc. and give it to service desk engineer so the can solve the ticket related to user detail modification by own.
For the above requirement modify-all permission is required, but i want to do this without any dependency of an logged-in user means in system-mode context.
Please suggest some ideas.

i tried visual flow and process-builder but i get to know that visual flow run's in a user-mode and process-builder doesn't support screen. only we can execute the auto-flow(which doesn't have screen to take the input from the user).
Can somebody please help me out here how to measure based on the sum of # instead of a count of rows or sum of the amount because on my case # is not appearing on the creating lens window Thanks in advance. PFB more details.

User-added image
Hello,
l need to put in place a workflow that simply sends a reminder email to a task owner on tha task due date.

I've tried to find a step by step up to date tutorial to do that on Lightning or Salesforce Classic but have only found https://screencast-o-matic.com/watch/cofjF2e9Yt where, unfortunately, the interface and the steps don't seem to transpose in the new interface.

Does anyone has the right tutorial please?

Best,
David

A User has changed the Record Page Settings and this has changed all page layouts for every object in our Org.
We do backup nightly changes in data and metadata but I am not sure which component of the metadata this would be captured in. Can I have some advise pleas,e we need to revert to the Record Pages as they were before this change was made ASAP.
Thanks
how to identify metadata type
i am trying to populate componentB in new tab onclick of a button from componentA using e.force:navigateToComponent  unable to navigate ?????  ANY ideas on this .

js
----
navigateToComponents: function(component, event, helper) {
        var evt = $A.get("e.force:navigateToComponent");
        evt.setParams({
            componentDef : "c:SPC_Support",
            componentAttributes: {
            }
        });
        evt.fire();
    } 

componentA
-------
 <lightning:button variant="base" label="Support" onclick="{!c.navigateToComponents}" />

componentB
-----
<div > header<div>
<div>body<div>

any idea please help me in navigating to new component in a new browser tab?????????
Hi, 

I need help in writting test class for this batch class, It deletes opportunity if the custom record(child to Opportunity) is not present.

Opportunity is child to Account.

Please find the codee

global class OpportunityDeleteBatch implements Database.Batchable<sObject>,Schedulable{
    
    global void execute(SchedulableContext sc){
        OpportunityDeleteBatch bc = new OpportunityDeleteBatch();
        database.executeBatch(bc);
    }
    global Database.QueryLocator start(Database.BatchableContext bc){
        return database.getQueryLocator([Select Id, Name From Opportunity WHERE RecordType.Name= 'Retail - FR' AND ID NOT IN ( Select Opportunity__c from Product_Interest__c)]);
    }
    global void execute(Database.BatchableContext bc,List<Opportunity> opp){
        if(!opp.isEmpty()){
            database.delete(opp,false);
        }
    }
    global void finish(Database.BatchableContext bc){
        
    }

}



 
Hi all

I would like to offer my team quick support using the Jira software instead of Salesforce cases. The easiest way would be to inject a tiny button (via script).

I understand that it is not possible to directly inject a 3rd party JS library into the lightning experience. Is it possible to embed and execute the following code? (or do you have another way to embed a 3rd party support button)

<script data-jsd-embedded data-key="###" data-base-url="https://jsd-widget.atlassian.com" src="https://jsd-widget.atlassian.com/assets/embed.js"></script>
I am looking for a solution where when I click on a button, the resulting page should open in the same window below the button. Below is my current VF page, right now the page is opening in a new tab.
 
<apex:page lightningStylesheets="true">
<style>
    body input.btn, body input.btnDisabled, body input.btnCancel {
    padding: 4px 3px;
    padding-left: 1rem;
    padding-right: 1rem;
    text-align: center;
    vertical-align: middle;
    justify-content: center;
    border: 1px solid #dddbda;
    transition: border .15s linear;
    background-color: #0070d2;
    border-color: #0070d2;
    /* color: #fff; */
    width: 300px;
    height: 35px;
    }
</style>

<apex:form target="_self" >

        <center>
            <apex:commandButton id="one" value="Lead Page" oncomplete="openDashboard(this.id);" />&nbsp;&nbsp;
            <apex:commandButton id="two" value="Account Page" oncomplete="openDashboard(this.id);"/> 
        </center>
        <br/>
</apex:form>

<script type="text/javascript">
function openDashboard(clicked_id) {
    if(clicked_id.includes('one')){
        window.open("Lead URL");
    }else if(clicked_id.includes('two')){
        window.open("Account URL");
    } 
}
</script>
I am working on the trailhead link : Control Access to Fields
Learning Objectives
https://trailhead.salesforce.com/content/learn/modules/data_security/data_security_fields

I cloned the profile "Standard User", but I am not understanding how salesforce as mentioned to give Field Permissions: Rating field of account object.

So this is stopping me from completing my trailhead.

Thanks
Tina
When I convert the opportunity to the project, then the 'Project number' field starts with 'SRM4011000' format. If I convert a single opportunity into many other sub level projects then the 'Sub level project number' field starts with 'SRM4011001' format. and every time a new sub level project is created the 'Sub level project number' will be increased by 1.


Now I have a requirement, to update the field from project to opportunity when the project is created for the first time but not every time the project is created.
Can anyone please help me solve this?

Thanks in advance
Jaa
 
Hi, 

I need help combining two list and show it on a table in SalesForce. 

Below is my apex controller class and my apex page and screenshot of my visual force page. 

Apex controller 
class 
 
public with sharing class IITDeanDashBoardController {
   public List<AggregateResult> BadgeList {
       get
       {
           List<AggregateResult> badges= [
                SELECT TargetX_SRMb__College__c
                , Department__c
                , IIT_Program__r.Name ccc
                   , count(Id) bbb
                FROM TargetX_SRMb__Application__c
                WHERE TargetX_SRMb__College__c = 'Chicago-Kent College of Law' 
                   And TargetX_SRMb__Start_Term_Year__c = '2019'
                And TargetX_SRMb__Start_Term__c = 'Fall'
                And TargetX_SRMb__Level__c = 'Graduate'
                   And TargetX_App__Is_Test_Record__c = False
                And TargetX_SRMb__Application_Submit_Date__c != Null 
                GROUP BY IIT_Program__r.Name, Department__c, TargetX_SRMb__College__c
                Order By IIT_Program__r.Name
            ];     
           return badges;
       }
       set;       
    }
    
   public List<AggregateResult> InQueueDecision {
       get
       {
           List<AggregateResult> QueueDecisions= [
                SELECT IIT_Program__r.Name ccc,
                count(Id) InDecision
                FROM TargetX_SRMb__Application__c
                WHERE TargetX_SRMb__College__c = 'Chicago-Kent College of Law' 
                   And TargetX_SRMb__Start_Term_Year__c = '2019'
                And TargetX_SRMb__Start_Term__c = 'Fall'
                And TargetX_SRMb__Level__c = 'Graduate'
                   And TargetX_App__Is_Test_Record__c = False
                And TargetX_SRMb__Application_Submit_Date__c != Null 
                And IIT_Sent_For_Faculty_Decision__c = Null
                And TargetX_SRMb__Application_Decision__c = Null
                GROUP BY IIT_Program__r.Name, Department__c, TargetX_SRMb__College__c
            ];                 
           return QueueDecisions;
       }
       set;       
    }
     
}

Apex Visual Force Page
<apex:page controller="IITDeanDashBoardController" >
    <apex:pageBlock >
        <apex:pageBlockTable value="{!BadgeList}" var="a" title="My Badges" columns="4" align="center"  styleClass="table table-striped">
            <apex:facet name="header">Chicago-Kent College of Law DashBoard </apex:facet> 
            <apex:column > 
            <apex:facet name="header">College</apex:facet>
            {!a['TargetX_SRMb__College__c']}</apex:column>
            <apex:column > <apex:facet name="header">Department</apex:facet>
            {!a['Department__c']}</apex:column>
             <apex:column > <apex:facet name="header">Program</apex:facet>
            {!a['ccc']}</apex:column>
             <apex:column > <apex:facet name="header">Total Apps</apex:facet>
            {!a['bbb']}</apex:column>
        </apex:pageBlockTable>
      </apex:pageBlock>    
    
    
        <apex:pageBlock >
        <apex:pageBlockTable value="{!InQueueDecision}" var="n" title="InqueueProcess" columns="4" align="center"  styleClass="table table-striped">
            <apex:facet name="header">Chicago-Kent College of Law DashBoard </apex:facet> 
            <apex:column > 
            <apex:facet name="header">Program</apex:facet>
            {!n['ccc']}</apex:column>
            <apex:column > <apex:facet name="header">Number of app status InProcess</apex:facet>
            {!n['InDecision']}</apex:column>
        </apex:pageBlockTable>
      </apex:pageBlock>   
  </apex:page>

Actual Page looks
User-added image 



 
Need to add Generate new password and notify user immediately check box  in Visualforce page? kindly help me out
 
Since yesterday, i have a problem with a flow called by custom button.
The custom button contains the following url:

/s/flow/RiassegnaCaso?IdCaso={!Case.Id}&CurrentUserId={!$User.Id}

with 2 parameters, caseId and UserId.

It worked fine for over 6 months. Now the error message is:
"An unmanaged error occurred in the stream"
In Public Groups/ Queue  Available Members will be User, public Groups, Roles, Roles and Subordinates. How do we know that a perticular user is avaialble in this Queue/Public Group that might be either based on Role/Another Inner Public Group/ Roles and SubOrdinate . Apex code will be help full. (I refered Mostly commanly avaiable Google Searches.)
I am implementing salesforce survey, so while creating a survey on the closer of the case,
once surveyinvitation is created then need to update field back on to the case as flag field as true,  I am able to achieve this with process builder but as we don't have any control on the execution of process builder so I want to update the case via apex,

Using trigger on survey invitation object but I am getting an error , please help me on this.
any help will be highly appreciated.
 
Here is my piece of code and we are using handler pattern
Class:

public without sharing class SurveyInvitationTriggerHandler extends TriggerHandler {
    
    
   
    public static list<Case> updCase = new list<Case>();
    /**
    * Called in bulk for after triggers
    * 
    * @param void
    */
    public override void bulkAfter(){
     List<SurveyInvitation> lsSurveyInviation = (List<SurveyInvitation>)trigger.new;
     
     List<Id> casezId = new List<Id>();
     List<Id> workOrderIds = new List<Id>();
     for (SurveyInvitation sI:lsSurveyInviation){
            workOrderIds.add(sI.Work_Order__c);
         
     }

     for(SVMXC__Service_Order__c wo: [ select id,SVMXC__Case__c from SVMXC__Service_Order__c where id in:workOrderIds])
     {
            casezId.add(wo.SVMXC__Case__c);

     }
     
  
    for(case cs : [select id,GSMS_Survey_Sent__c from case where id IN : casezId])
    {
      
      cs.GSMS_Survey_Sent__c=true;
      updCase.add(cs);

    }
    }

    public override void andFinally() {
         if (trigger.isUpdate || trigger.IsAfter) {            
             update updCase;}
    }
}

Error:
INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY: Access to entity 'SurveyInvitation' denied: Entity is not api accessible
 

Hi, Thanks for looking into my question.  I'd like to build a new feature that allows the Salesmen to enter very detailed lost reasons. such as:

----Example:
Opportunity stage changes to Closed Lost
-> Lost Reason Category: Low Flexibility
-> Lost reason sub categories for Low Flexibility : Lack of custom fields
-> On which page did you need the custom fields? : Sign-up page
-> How did you want to use the custom fields?: Ask custom questions before signing up
----

What would be the best way to implement it?
I was thinking about setting up a custom object called 'Lost Reasons' but even then I couldn't think of a way to have 5 level of picklists.  I could create many custom picklists and use visualforce page to change the following picklist based on the previous picklist selection.  However, it wouldn't have been able to be summaried in the Related List on Opportunity page. 

I am soo lost

Please share your wisdom

Thanks and kind regards,

Hi i have two different fileds Asked question and Response(picklist).now i want to save all response value.how i will do by wrapper class.User-added image  
  • June 18, 2019
  • Like
  • 0