• Babar Hussain 4
  • NEWBIE
  • 40 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 20
    Questions
  • 21
    Replies

Hi Friends,
Can anyone help me how to find user created cases as a guest user.
I have one ticket user created case but she doesn't reveied any case number.

Can anyone give me a hint how to find the case number for specific user created.

ex: user name is lori beck

Hi Friends,
I'm creating a new user in the production, But I'm getting error like

Error: This Federation ID is already in use. Use a different Federation ID.

My question is how to find duplicate Federation ID using SOQL query 

Can anyone help on this and share the SOQL query to me.

Hi Friends,
I had one requirement : - Make Picklist Unmandatory based on other picklist value in flows 
Anyone knows how to approach this requirement please suggest the steps 

Hi Everyone

When I login as a user and try to open all sites cloud org but it asking me to login first, why?
Can anyone know how to reslove this issue

 

 

Requirement;
***This logic apply to only T&E Record Type.****
As per current logic, creating tasks and assign to Buy Desk when the amount is under 250K.
As per new logic, Create below list of Tasks and route approval to GSM LCM irrespective of Project Type and remove 250k price condition.
Data Privacy Review
Insurance Review
Supplier Diversity Review
Buy Desk Review
Technical Solution:
Update logic in below Apex class
CaseTriggerProcurementHandler
CaseTriggerProcurementHandlerTest

Can anyone please modify my apex code as per the requirement this is immediate deliver change, and the help won't be forgettable.
*****************************************************************************
********************************************************************************

@isTest
public class CaseTriggerProcurementHandlerTest {
    
    //Create test data, available for every test
    @testSetup 
    public static void testClassData() 
    {    
        
    }
    
    
    @isTest
    public static void testBuyDeskTask()
    {
        Id rtId = Schema.SObjectType.Case.getRecordTypeInfosByDeveloperName().get('Procurement_Professional_Services').getRecordTypeId();
        //Create Case
        case cse = New Case(
            RecordTypeId = rtId,
            Total_Expected_Cost_for_Duration__c = 20000,
            Region__c = 'APAC',
            Procurement_System__c = 'Non-Ariba'
        );
        insert cse;
        
        List<Task> tsklist = [Select Id FROM Task  WHERE WhatId = :cse.id];
        system.assertNotEquals(tsklist.size() , 0);
    }
    
        @isTest
    public static void testITBuyDeskTask()
    {
        Id rtId = Schema.SObjectType.Case.getRecordTypeInfosByDeveloperName().get('Procurement_Professional_Services').getRecordTypeId();
        //Create Case
        case cse = New Case(
            RecordTypeId = rtId,
            Total_Expected_Cost_for_Duration__c = 20000,
            Region__c = 'APAC',
            BRM_Listing__c ='scott.strong@sbdinc.com',
            BRM_Email_Address__c='scott.strong@sbdinc.com'
        );
        insert cse;
        
        List<Task> tsklist = [Select Id FROM Task  WHERE WhatId = :cse.id];
        system.assertNotEquals(tsklist.size() , 0);
    }
    
    @isTest
    public static void testLCMTask()
    {
        Id rtId = Schema.SObjectType.Case.getRecordTypeInfosByDeveloperName().get('Procurement_Professional_Services').getRecordTypeId();
        //Create Case
        case cse = New Case(
            RecordTypeId = rtId,
            Total_Expected_Cost_for_Duration__c = 260000,
            Region__c = 'APAC'
        );
        insert cse;
        
        List<Task> tsklist = [Select Id FROM Task  WHERE WhatId = :cse.id];
        system.assertNotEquals(tsklist.size() , 0);
    }
    
    @isTest
    public static void testITLCMTask()
    {
        Profile p = [SELECT Id FROM Profile WHERE Name='System Administrator'];
        Blob b = Crypto.GenerateAESKey(128);
        String h = EncodingUtil.ConvertTohex(b);
        String uid = h.SubString(0,8);
        User u = new User(Alias = uid, Email= uid + '@myorg.com', 
                          EmailEncodingKey='UTF-8', LastName='Testing', LanguageLocaleKey='en_US', 
                          LocaleSidKey='en_US', ProfileId = p.Id, 
                          TimeZoneSidKey='America/New_York', UserName= uid +'mvkrish@myorg.com');
        insert u;
        Id rtId = Schema.SObjectType.Case.getRecordTypeInfosByDeveloperName().get('Procurement_Professional_Services').getRecordTypeId();
        //Create Case
        case cse = New Case(
            RecordTypeId = rtId,
            Total_Expected_Cost_for_Duration__c = 260000,
            Region__c = 'APAC',
            BRM_Listing__c ='scott.strong@sbdinc.com',
            Requestor_Email__c = 'testproc2@proc2.com',
            BRM_Email_Address__c='scott.strong@sbdinc.com'
        );
        insert cse;
        //KSAINI: June 14 2022
        List<Task> tsklist = [Select Id FROM Task  WHERE WhatId = :cse.id];
        system.assertNotEquals(tsklist.size() , 0);
        List<Task> updatelist = new List<Task>();
        for(Task t : tsklist)
        {
            t.Status = 'Completed';
            updatelist.add(t);
        }
        
        update updatelist;
        List<Case> listOfCases = [Select Id, Status from Case Where Id =:cse.Id];
        listOfCases[0].OwnerId = u.Id;
        //listOfCases[0].BRM_Email_Address__c ='test@test.com';
        update listOfCases;
        List<Case> listOfupdatedCase = [Select Id, Status from Case Where Id =:cse.Id];
        listOfupdatedCase[0].Status = 'Closed';
        update listOfupdatedCase;
        
    }
    
    @isTest
    public static void testTradeComplianceTask() //Covers Trade Compliance, risk and diversity
    {
        Id rtId = Schema.SObjectType.Case.getRecordTypeInfosByDeveloperName().get('Procurement_Professional_Services').getRecordTypeId();
        //Create Case
        case cse = New Case(
            RecordTypeId = rtId,
            Total_Expected_Cost_for_Duration__c = 260000,
            Region__c = 'APAC',
            Project_Type__c = 'New Contract'
        );
        insert cse;
        
        List<Task> tsklist = [Select Id FROM Task  WHERE WhatId = :cse.id];
        system.assertNotEquals(tsklist.size() , 0);
    }
    
    @isTest
    public static void testSourcingCouncilTask() //Covers Trade Compliance, risk and diversity
    {
        Id rtId = Schema.SObjectType.Case.getRecordTypeInfosByDeveloperName().get('Procurement_Professional_Services').getRecordTypeId();
        //Create Case
        case cse = New Case(
            RecordTypeId = rtId,
            Total_Expected_Cost_for_Duration__c = 600000
        );
        insert cse;
        
        List<Task> tsklist = [Select Id FROM Task  WHERE WhatId = :cse.id];
        system.assertNotEquals(tsklist.size() , 0);
    }
}
My requirement is when case status(piclist) updated , task status (Picklist) should be updated as same
Trigger On Case :
trigger CaseTriggers on Case (after update) {
    CaseTriggersHandlers cas=new CaseTriggersHandlers();
    cas.updateTkstatus(Trigger.New);
}

Apex Class :
public class CaseTriggersHandlers {
    public void updateTkstatus(List<Case> listcase){ // Multiple Case record
        List<Task> lisTas = [select Status,Case.Status from Task where CaseId =:listcase];
        List<Task> liststatus =new List<Task>();
        Task sT = new Task();
        for(Task tk : lisTas)
        {
            sT.Status=sT.Case.Status;
            liststatus.add(sT);
        }
        update liststatus;
}I'm getting error in this code can anyone please modify and share to meUser-added image
}

Hi Everyone,
Can Anyone suggest this case how to approach:
When I choose On Hold in Path the case Object Status(picklist) value should be updated as On Hold. How can I achieve
User-added image

Hi Friends can anyone please help me in this case. I need to update the Task Owner, Task Status & Case Owner if the approval rejected the process.  Please modify the apex code according to it and share to me that is very helpful to me & I'm verypoor in coding.User-added imageUser-added image
Please find the attached screenshots & Apex Code 

Apex Code :
public without sharing class CaseTriggerProcurementHandler {
   
    public static void handleprocurementCaseAfterInsert(List<SObject> newSobjs)
    {
        //Turn SObject list to case list
        List<Case> newCases = (List<Case>) newSobjs;
       
        //Get RT name, to match to the cmdt
        Map<ID,Schema.RecordTypeInfo> rt_Map = Case.sObjectType.getDescribe().getRecordTypeInfosById();
        //Create empty list of tasks to be inserted
        Task[] tskList = new List<Task>();
       
        //Create empty var to store the mapping of tasks that match the case record type
        List<Procurement_Case_Task_Settings__mdt> recordTypeSpecificMap = new List<Procurement_Case_Task_Settings__mdt>();
       
        //Will contain the list of tasks to be created if case details match the conditional logic
        List<Procurement_Case_Task_Settings__mdt> conditionalMap = new List<Procurement_Case_Task_Settings__mdt>();
       
        //Get case record type/task mappings
        Procurement_Case_Task_Settings__mdt[] fullTaskMapping = [Select Id, Task_Owner__c,Task_Record_Type__c, Task_Subject__c, Task_Status__c, Case_Record_Type__c, Task_Type__c, Label, Task_SLA_Days__c, Conditional_Creation__c
                                                                 FROM Procurement_Case_Task_Settings__mdt];
       
        Id itRecTypeId = Schema.SObjectType.Case.getRecordTypeInfosByDeveloperName().get('Procurement_IT').getRecordTypeId();
       
        Boolean buyDeskTaskCreated = false;
        Boolean projectTypePOSCT = false;
       
        //Loop through all cases in trigger
        for(case u : newCases){
           
            //Loop through the full task mapping
            for(Procurement_Case_Task_Settings__mdt fs : fullTaskMapping){
               
                //For the case record type, find all matching task mappings and add to a list
                If (fs.Case_Record_Type__c == rt_map.get(u.recordTypeID).getDeveloperName()){
                    recordTypeSpecificMap.add(fs);
                }
            }
           
            //Loop through specific mapping
            for(Procurement_Case_Task_Settings__mdt sm : recordTypeSpecificMap){
               
                //Create tasks with unconditional creation logic (Specified in the cmdt mapping)
                If (!sm.Conditional_Creation__c && u.Project_Type__c != 'PO/SCT Approval Only'){
                    Task tsk = New Task(
                        RecordTypeId = sm.Task_Record_Type__c,
                        Subject = sm.Task_Subject__c,
                        status = sm.Task_Status__c,
                        Type = sm.Task_Type__c,
                        OwnerId = sm.Task_Owner__c,
                        WhatId = u.id,
                        ActivityDate = date.today() + integer.valueof(sm.Task_SLA_Days__c));
                    tskList.add(tsk);
                } else {
                   
                    /**************************************
                    CONDITIONAL CREATION LOGIC
                    For all tasks where the CMDT mappng's Conditional_Creation__c is TRUE, check whether the case details match creation requirements
                    ***************************************/
                    //Create Buy Desk Review for non-IT case?
                    /*If (u.RecordTypeId != itRecTypeId &&
                        sm.Task_Type__c == 'Buy Desk Review' &&
                        u.Total_Expected_Cost_for_Duration__c < 250000 &&
                        u.Procurement_System__c == 'Ariba' &&
                        (u.Region__c == 'North America' || u.Region__c == 'EANZ')){
                        conditionalMap.add(sm);
                        buyDeskTaskCreated = true;
                    }*/
                   
                    //Create GSM LCM Review for non-IT case?
                    /*If (u.RecordTypeId != itRecTypeId &&
                        sm.Task_Type__c == 'GSM LCM Review' &&
                        !(u.Total_Expected_Cost_for_Duration__c < 250000 &&
                        u.Procurement_System__c == 'Ariba' &&
                        (u.Region__c == 'North America' || u.Region__c == 'EANZ'))){
                        conditionalMap.add(sm);
                    } */    
                   
                    //Create Buy Desk Review for IT case?
                    If (//u.RecordTypeId == itRecTypeId &&
                        sm.Task_Type__c == 'Buy Desk Review' &&
                        u.Total_Expected_Cost_for_Duration__c < 250000){
                        conditionalMap.add(sm);
                           
                       buyDeskTaskCreated = true;
                    }
                   
                    //Create GSM LCM Review for IT case?
                    If (//u.RecordTypeId == itRecTypeId &&
                        sm.Task_Type__c == 'GSM LCM Review' &&
                        !(u.Total_Expected_Cost_for_Duration__c < 250000)){
                        conditionalMap.add(sm);
                    }
                   
                   
                   
                    //Create Trade Compliance Review? removed PO/SCT Approval Only
                    list <String> tcProjTypes = new List <String> {'Proof of Concept', 'New Contract', 'Sourcing Event (RFQ, RFP, RFI)'};
                        If (sm.Task_Type__c == 'Trade Compliance Review' && tcProjTypes.Contains(u.Project_Type__c)){
                            conditionalMap.add(sm);
                        }
                   
                    //Create Supplier Risk Review? 06/02:removed 'Amendment/SOW'
                    list <String> srProjTypes = new List <String> {'Contract Renewal/Renegotiation', 'Proof of Concept', 'New Contract', 'Sourcing Event (RFQ, RFP, RFI)'};
                        system.debug(srProjTypes);
                    If (sm.Task_Type__c == 'Supplier Risk Review' && srProjTypes.Contains(u.Project_Type__c)){
                        conditionalMap.add(sm);
                    }
                   
                    //Create Supplier Divesity Review?
                    list <String> sdProjTypes = new List <String> {'Amendment/SOW', 'Proof of Concept', 'New Contract', 'Sourcing Event (RFQ, RFP, RFI)'};
                        If (sm.Task_Type__c == 'Supplier Diversity Review' && sdProjTypes.Contains(u.Project_Type__c)){
                            conditionalMap.add(sm);
                        }
                   
                    //Create Sourcing Council Review?
                    If (sm.Task_Type__c == 'Sourcing Council Review' && (u.Total_Expected_Cost_for_Duration__c >= 500000)){
                        conditionalMap.add(sm);
                    }
                }
            }
           
            //Create tasks with conditional creation logic
            for(Procurement_Case_Task_Settings__mdt cMap : conditionalMap){
                Task tsk = New Task(
                    RecordTypeId = cMap.Task_Record_Type__c,
                    Subject = cMap.Task_Subject__c,
                    status = cMap.Task_Status__c,
                    Type = cMap.Task_Type__c,
                    OwnerId = cMap.Task_Owner__c,
                    WhatId = u.id,
                    ActivityDate = date.today() + integer.valueof(cMap.Task_SLA_Days__c));
                tskList.add(tsk);
            }
        }
       
        //Scott 05/06/22 If Buy Desk Review Task is created, then Data Privacy Review and Insurance Review should also be routed to Buy Desk Team, not to LCM GSM Team
        if(buyDeskTaskCreated == true){
            for(task tsk : tskList){
                if(tsk.Type == 'Data Privacy Review' || tsk.Type == 'Insurance Review' ){
                    tsk.OwnerId = '00G4x000000S8Wj'; //buydesk queue
                }
            }
        }
       
        //Insert List of all tasks
        Insert tskList;
    }
   
    public static void handleprocurementCaseBeforeUpdate(List<SObject> newSobjs, List<SObject> oldSobjs)
    {
        //Turn SObject list to case list
        List<Case> newCases = (List<Case>) newSobjs;
        List<Case> OldCases = (List<Case>) oldSobjs;
        Map<Id, Case> mapOfExistingRecords = new Map<Id, Case>();
        Set<Id> setOfCaseId = new Set<Id>();
        List<Task> listOfTasks = new List<Task>();
        List<Task> listOfColsedTasks = new List<Task>();
       
         List<ProcessInstance > listOfProcessInstance  = new List<ProcessInstance>();
        List<ProcessInstance > listOfClosedProcessInstance  = new List<ProcessInstance>();
        for(Case c : OldCases)
        {
            mapOfExistingRecords.put(c.Id, c);
        }
       
        for(Case cse : newCases)
        {
            Case oldcase = (Case)mapOfExistingRecords.get(cse.Id);
           
            if(cse.Status == 'Closed' && oldcase.Status != 'Closed')
            {
                setOfCaseId.add(cse.Id);
            }
        }
       
        If(!setOfCaseId.isEmpty())
        {
            listOfTasks = [Select id,Status from Task where WhatId IN:setOfCaseId];
            listOfProcessInstance = [SELECT TargetObjectId, Status, Id FROM ProcessInstance where TargetObjectId IN:setOfCaseId
                                         ORDER BY CreatedDate DESC
                                         Limit 1];
            system.debug('listOfProcessInstance-->'+listOfProcessInstance);
            if(!listOfTasks.isEmpty())
            {
                for(Task t : listOfTasks)
                {
                    if(t.Status == 'Completed'  || t.Status == 'No Longer Required')
                    {
                        listOfColsedTasks.add(t);
                    }
                }
            }
           
            /*if(!listOfProcessInstance.isEmpty())
            {
                for(ProcessInstance p : listOfProcessInstance)
                {
                    if(p.Status == 'Approved')
                    {
                        listOfClosedProcessInstance.add(p);
                    }
                }
            }*/
           
        }
       
        for(Case cse : newCases)
        {
            Case oldcase = (Case)mapOfExistingRecords.get(cse.Id);
            if(cse.Status == 'Closed' && oldcase.Status != 'Closed')
            {
                if(!listOfTasks.isEmpty())
                {
                   if(listOfTasks.Size()!=listOfColsedTasks.size())
                   {
                       cse.addError('Please close all the taks before you close the case');
                       
                   }
                }
               
                if(!listOfProcessInstance.isEmpty())
                {
                    for(ProcessInstance p : listOfProcessInstance)
                    {
                        if(p.Status == 'Pending')
                        {
                            cse.addError('Please complete all the approval before you close the case');
                        }
                    }
                }
               
                   
            }
        }
    }
}
 
Can anyone help me , what is the condition do I need to set in decision element to match due date equals to today's date and send an email
For your reference I attached screenshots below.

User-added imageUser-added imageUser-added image
I had picklist on Lead object, If I select picklist value as "Other"  text field  should be required and show, For remaining picklist values text field should be disable or hide.

Note : Without visualforce method recommend other alternate options

User-added image
Requirement:-
Context:   For activities in Salesforce that have an end date of "today" Can we have the ability to turn on an email reminder to be sent to the Event owner. Notifications do appear in Salesforce application, but some RSMs would like alerts via email.
Note : Using flows only I need to achieve.
Can Anyone please check my flows screenshots and tell me where I was wrongly did
User-added imageUser-added imageUser-added imageUser-added imageUser-added image
Requirement : As a: Salesforce.com Task owner, I want to receive an email notification when a Task end date equals today’s date.
Note : using flows only.
Can anyone please tell me how to do that I'm bit confued how to do that.
Thanks,
babarUser-added imageUser-added imageUser-added imageUser-added image
Requirement : As a: Salesforce.com Task owner, I want to receive an email notification when a Task end date equals today’s date.
Note : using flows only.
Can anyone please tell me how to do that I'm bit confued how to do that.
Thanks,
babar

I'm getting error in get records screen, Anyone know why. Actually I'm trying to create email alert for events if due date is todayMy Requirement is :

As a: Salesforce.com Event owner, I want to receive an email notification when an Event end date equals today’s date.

Note: Using flows I need to do, No workflows & no process builder

how to write query for event object where it storing record in backend in dev console?
Can anyone share the query how we check in developer console
I need to generate email alert when event due date is today using flows only, How can I target event fileds in the flows and which flow do I need to select to this requirement?

Which flow do I need to select
I need to generate email alert when event due date is today using flows only, How can I target event fileds in the flows and which flow do I need to select to this requirement?
 
My requirement is to hide & show text field based on picklist values selected on lead object can anyone suggest the best way

Hi Friends,
I'm creating a new user in the production, But I'm getting error like

Error: This Federation ID is already in use. Use a different Federation ID.

My question is how to find duplicate Federation ID using SOQL query 

Can anyone help on this and share the SOQL query to me.

Requirement;
***This logic apply to only T&E Record Type.****
As per current logic, creating tasks and assign to Buy Desk when the amount is under 250K.
As per new logic, Create below list of Tasks and route approval to GSM LCM irrespective of Project Type and remove 250k price condition.
Data Privacy Review
Insurance Review
Supplier Diversity Review
Buy Desk Review
Technical Solution:
Update logic in below Apex class
CaseTriggerProcurementHandler
CaseTriggerProcurementHandlerTest

Can anyone please modify my apex code as per the requirement this is immediate deliver change, and the help won't be forgettable.
*****************************************************************************
********************************************************************************

@isTest
public class CaseTriggerProcurementHandlerTest {
    
    //Create test data, available for every test
    @testSetup 
    public static void testClassData() 
    {    
        
    }
    
    
    @isTest
    public static void testBuyDeskTask()
    {
        Id rtId = Schema.SObjectType.Case.getRecordTypeInfosByDeveloperName().get('Procurement_Professional_Services').getRecordTypeId();
        //Create Case
        case cse = New Case(
            RecordTypeId = rtId,
            Total_Expected_Cost_for_Duration__c = 20000,
            Region__c = 'APAC',
            Procurement_System__c = 'Non-Ariba'
        );
        insert cse;
        
        List<Task> tsklist = [Select Id FROM Task  WHERE WhatId = :cse.id];
        system.assertNotEquals(tsklist.size() , 0);
    }
    
        @isTest
    public static void testITBuyDeskTask()
    {
        Id rtId = Schema.SObjectType.Case.getRecordTypeInfosByDeveloperName().get('Procurement_Professional_Services').getRecordTypeId();
        //Create Case
        case cse = New Case(
            RecordTypeId = rtId,
            Total_Expected_Cost_for_Duration__c = 20000,
            Region__c = 'APAC',
            BRM_Listing__c ='scott.strong@sbdinc.com',
            BRM_Email_Address__c='scott.strong@sbdinc.com'
        );
        insert cse;
        
        List<Task> tsklist = [Select Id FROM Task  WHERE WhatId = :cse.id];
        system.assertNotEquals(tsklist.size() , 0);
    }
    
    @isTest
    public static void testLCMTask()
    {
        Id rtId = Schema.SObjectType.Case.getRecordTypeInfosByDeveloperName().get('Procurement_Professional_Services').getRecordTypeId();
        //Create Case
        case cse = New Case(
            RecordTypeId = rtId,
            Total_Expected_Cost_for_Duration__c = 260000,
            Region__c = 'APAC'
        );
        insert cse;
        
        List<Task> tsklist = [Select Id FROM Task  WHERE WhatId = :cse.id];
        system.assertNotEquals(tsklist.size() , 0);
    }
    
    @isTest
    public static void testITLCMTask()
    {
        Profile p = [SELECT Id FROM Profile WHERE Name='System Administrator'];
        Blob b = Crypto.GenerateAESKey(128);
        String h = EncodingUtil.ConvertTohex(b);
        String uid = h.SubString(0,8);
        User u = new User(Alias = uid, Email= uid + '@myorg.com', 
                          EmailEncodingKey='UTF-8', LastName='Testing', LanguageLocaleKey='en_US', 
                          LocaleSidKey='en_US', ProfileId = p.Id, 
                          TimeZoneSidKey='America/New_York', UserName= uid +'mvkrish@myorg.com');
        insert u;
        Id rtId = Schema.SObjectType.Case.getRecordTypeInfosByDeveloperName().get('Procurement_Professional_Services').getRecordTypeId();
        //Create Case
        case cse = New Case(
            RecordTypeId = rtId,
            Total_Expected_Cost_for_Duration__c = 260000,
            Region__c = 'APAC',
            BRM_Listing__c ='scott.strong@sbdinc.com',
            Requestor_Email__c = 'testproc2@proc2.com',
            BRM_Email_Address__c='scott.strong@sbdinc.com'
        );
        insert cse;
        //KSAINI: June 14 2022
        List<Task> tsklist = [Select Id FROM Task  WHERE WhatId = :cse.id];
        system.assertNotEquals(tsklist.size() , 0);
        List<Task> updatelist = new List<Task>();
        for(Task t : tsklist)
        {
            t.Status = 'Completed';
            updatelist.add(t);
        }
        
        update updatelist;
        List<Case> listOfCases = [Select Id, Status from Case Where Id =:cse.Id];
        listOfCases[0].OwnerId = u.Id;
        //listOfCases[0].BRM_Email_Address__c ='test@test.com';
        update listOfCases;
        List<Case> listOfupdatedCase = [Select Id, Status from Case Where Id =:cse.Id];
        listOfupdatedCase[0].Status = 'Closed';
        update listOfupdatedCase;
        
    }
    
    @isTest
    public static void testTradeComplianceTask() //Covers Trade Compliance, risk and diversity
    {
        Id rtId = Schema.SObjectType.Case.getRecordTypeInfosByDeveloperName().get('Procurement_Professional_Services').getRecordTypeId();
        //Create Case
        case cse = New Case(
            RecordTypeId = rtId,
            Total_Expected_Cost_for_Duration__c = 260000,
            Region__c = 'APAC',
            Project_Type__c = 'New Contract'
        );
        insert cse;
        
        List<Task> tsklist = [Select Id FROM Task  WHERE WhatId = :cse.id];
        system.assertNotEquals(tsklist.size() , 0);
    }
    
    @isTest
    public static void testSourcingCouncilTask() //Covers Trade Compliance, risk and diversity
    {
        Id rtId = Schema.SObjectType.Case.getRecordTypeInfosByDeveloperName().get('Procurement_Professional_Services').getRecordTypeId();
        //Create Case
        case cse = New Case(
            RecordTypeId = rtId,
            Total_Expected_Cost_for_Duration__c = 600000
        );
        insert cse;
        
        List<Task> tsklist = [Select Id FROM Task  WHERE WhatId = :cse.id];
        system.assertNotEquals(tsklist.size() , 0);
    }
}

Hi Everyone,
Can Anyone suggest this case how to approach:
When I choose On Hold in Path the case Object Status(picklist) value should be updated as On Hold. How can I achieve
User-added image

Can anyone help me , what is the condition do I need to set in decision element to match due date equals to today's date and send an email
For your reference I attached screenshots below.

User-added imageUser-added imageUser-added image
Requirement : As a: Salesforce.com Task owner, I want to receive an email notification when a Task end date equals today’s date.
Note : using flows only.
Can anyone please tell me how to do that I'm bit confued how to do that.
Thanks,
babar

I'm getting error in get records screen, Anyone know why. Actually I'm trying to create email alert for events if due date is todayMy Requirement is :

As a: Salesforce.com Event owner, I want to receive an email notification when an Event end date equals today’s date.

Note: Using flows I need to do, No workflows & no process builder

how to write query for event object where it storing record in backend in dev console?
Can anyone share the query how we check in developer console