• satish wagh
  • NEWBIE
  • 40 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 12
    Replies
I have created a junction object called 'Test1__c' between Opportunity and Contact, soql query on Test1__c object return nothing and got below error.
"System.QueryException: List has no rows for assignment to SObject".
I have given read permissions to the Opportunity, Contact and Test1__C object on the Profile of the site guest user but the problem still persists. Also mark apex class as a 'Without Sharing'.
On sharing setting module please the see the below setting:
User-added imageAlso,Please see below piece of code:
public without sharing class EmploymentIntegration {

public static string generateRequestJSON(String contactId,String lob,string uan,String officialEmail)
    {  
        
        system.debug('contactId'+contactId);//got value for contactId here successfully
        system.debug('lob'+lob);
        system.debug('uan'+uan);
        system.debug('officialEmail'+officialEmail);
        try
        {
            
            Employment_Details__c emp = [select id ,Employer_CIN__c,name,Applicant__r.name ,Applicant__r.MobilePhone,
                                         Applicant__r.Email,Applicant__r.Official_email_ID__c,
                                         Applicant__r.Applicant_Type__c,Company_Master__r.name,Applicant__c 
                                         from Employment_Details__c 
                                         where Is_Current_Employer__c = true and Applicant__r.Applicant_Type__c = 'Primary Applicant' 
                                         and Applicant__c =:contactId LIMIT 1];
            
        }
        catch(Kotak_CustomException ex){
           
        }  
        
    }
}

If removing Applicant__c=:contactId from WHERE clause then it returns data.
WHERE Is_Current_Employer__c = true AND Applicant__r.Applicant_Type__c = 'Primary Applicant' AND Applicant__c =:contactId LIMIT 1

 I did all the possible ways that need to resolve this problem but no use. Please help me to resolve this issue, I would be so thankful!
I have created the Multiselect picklist component and got above error while loading component. Any help would be appreciated!.
Please see below code:

Client Side Controller file :

({
    doInit:function(component,event,helper){
       
        helper.getOpetionsHelper(component);       
    },
    openDropdown:function(component,event,helper){
        $A.util.addClass(component.find('dropdown'),'slds-is-open');
        $A.util.removeClass(component.find('dropdown'),'slds-is-close');
    },
    closeDropDown:function(component,event,helper){
        $A.util.addClass(component.find('dropdown'),'slds-is-close');
        $A.util.removeClass(component.find('dropdown'),'slds-is-open');
    },
    selectOption:function(component,event,helper){        
        var label = event.currentTarget.id.split("#BP#")[0];
        var isCheck = event.currentTarget.id.split("#BP#")[1];
        helper.getOpetionsHelper(component,label,isCheck);
    }
})

Helper File : 

({
    getOpetionsHelper: function(component)
{
          var action = component.get("c.getOptions");
        
    action.setCallback(this, function(response) {
        var state  = response.getState();
        var optionResult = response.getReturnValue();
        console.log('response '+JSON.stringify(optionResult));
         var opt = new Array();
        for(var i=0;i<=optionResult.length;i++){  

            opt.push({isChecked:optionResult[i].isChecked,label:optionResult[i].label});
        }
        component.set("v.options",opt);
    });
    
    Server Side Controller : 
    
    public class MultiSelectPicklistCls {
    
    @AuraEnabled
    public static List<PickListOptions> getOptions()
    {
        List<PickListOptions> optList = new List<PickListOptions>();
        
    optList.add(new PickListOptions('Option 1',false));
    optList.add(new PickListOptions('Option 2',true));
    optList.add(new PickListOptions('Option 3',false));
    return optList;
    }

    // wrapper class 
    public class PickListOptions
    {
        @AuraEnabled 
        public String label {get;set;}
        @AuraEnabled 
        public boolean isChecked {get;set;}
        public PickListOptions(String label,boolean isChecked){
            this.label = label;
            this.isChecked = isChecked;
        }
    }
}
I have assigned custom timestamp to "starDateTime" standard field of event object by concatenating to custom date field but it shows additional 5:30 hours on Production.It works better in sandbox. I have following peace of code:
String selectedTime='09:00 to 09:30'
string selectedDate='2019/10/1 00:00:00';
event.DurationInMinutes=30;
string conTime = selectedTime.substring(0,5);
string conDate = selectedDate.substring(0,10);
selectedDate =selectedDate+' '+conTime+':00';
Datetime convertedDate = Datetime.valueOf(selectedDate);
event.Time_Slot__c=selectedTime;
event.StartDateTime= convertedDate;
insert event;

Above code gives right time in Start 9:00 and End 9:30 in event record but in production it shows 2:30 to 3:00. Please suggest any solution.Thanks!
I have a Datatable of 500 entries, each page contains 50 entries.
When I try to filter a property, I excepted it to filter all 500 entries, and paging the filtered result. But it only filter the 50 entries of the current page. Is this a bug? Can I configure somewhere to make it works as I excepted?

handleKeyChange(event) { var ordLst = JSON.parse(JSON.stringify(this.data)); const searchWord = event.detail.value; var results = ordLst, regex; var count; if(searchWord !==""){ try { regex = new RegExp(searchWord, "i"); // filter checks each row, constructs new array where function returns true results = ordLst.filter(row=>regex.test(row.CustomerNo) || regex.test(row.OrderStatus) || regex.test(row.SalesDocument) || regex.test(row.ShiptoCity) || regex.test(row.OrderDate.toString())); } catch(e) { // invalid regex, use full list } count = Object.keys(results).length; this.data = results; this.searchData(count,results,searchWord); } else { this.LoadData(this.value); } }
I have custom object 'Task'. and whant to achieve  this scenario:
On Monday morning, an email should go to each team member with the list of tasks that are due this week.
How to implemente this please guide.
I have two custom object called 'Project' and 'Task'. In 'Project' object 'Stage' field is a Picklist in which 'Not Started' ,'Development In Progress' ,'Testing', 'Completed' are values AND in 'Task' object  'Status' is a Picklist in which 'On Time' ,'Delayed' ,'At Risk' are values. 
Question is: User cannot update Project Stage to completed till all tasks under the
project are completed.
There is Master detail relantionship between Project object and task object. In which Project is a parent object and Task is a Detail object.
How to give record link to the description of Workflow Rule? Like:  eg:A new project (project link) has been created and assigned to you.  Please update the details of the project ASAP and assign the team  members.
I have one custom object  called 'Project'. Once an Opportunity is closed won,
system should automatically create a new project record. Following actions should be
taken
○ Project Name = Opportunity Name
○ Project Stage = Not Started
○ Project Owner = Opportunity Owner......... i created upto this correct but i can not able to create following remaining Part:

○ Create a task for Project Owner
■ Subject: New Project Created for you
■ Due Date: TODAY
■ Priority: High
■ Status: Not Started
■ Body: A new project (project link) has been created and assigned to you.
Please update the details of the project ASAP and assign the team
members.
How to give record link in description of action in process builder
Can we hide the field that is created at the time  of custom object creation
The project manager (Project’s owner) should have a way to add team members to the
project. These team members would be internal users of the Salesforce org. While
assigning team member, project manager would select a role for each team member.
Project Manager should be able to define the hourly rate for each team member.
○ Tester
○ Developer
○ Architect
○ Delivery Manager
1
How to write cross object trigger in salesforce?
I have one checkbox in one of my custom object and 'Instalment field' in another custom object, if that checkbox is checked in then first object then take sum of all instalments in another object
I have created the Multiselect picklist component and got above error while loading component. Any help would be appreciated!.
Please see below code:

Client Side Controller file :

({
    doInit:function(component,event,helper){
       
        helper.getOpetionsHelper(component);       
    },
    openDropdown:function(component,event,helper){
        $A.util.addClass(component.find('dropdown'),'slds-is-open');
        $A.util.removeClass(component.find('dropdown'),'slds-is-close');
    },
    closeDropDown:function(component,event,helper){
        $A.util.addClass(component.find('dropdown'),'slds-is-close');
        $A.util.removeClass(component.find('dropdown'),'slds-is-open');
    },
    selectOption:function(component,event,helper){        
        var label = event.currentTarget.id.split("#BP#")[0];
        var isCheck = event.currentTarget.id.split("#BP#")[1];
        helper.getOpetionsHelper(component,label,isCheck);
    }
})

Helper File : 

({
    getOpetionsHelper: function(component)
{
          var action = component.get("c.getOptions");
        
    action.setCallback(this, function(response) {
        var state  = response.getState();
        var optionResult = response.getReturnValue();
        console.log('response '+JSON.stringify(optionResult));
         var opt = new Array();
        for(var i=0;i<=optionResult.length;i++){  

            opt.push({isChecked:optionResult[i].isChecked,label:optionResult[i].label});
        }
        component.set("v.options",opt);
    });
    
    Server Side Controller : 
    
    public class MultiSelectPicklistCls {
    
    @AuraEnabled
    public static List<PickListOptions> getOptions()
    {
        List<PickListOptions> optList = new List<PickListOptions>();
        
    optList.add(new PickListOptions('Option 1',false));
    optList.add(new PickListOptions('Option 2',true));
    optList.add(new PickListOptions('Option 3',false));
    return optList;
    }

    // wrapper class 
    public class PickListOptions
    {
        @AuraEnabled 
        public String label {get;set;}
        @AuraEnabled 
        public boolean isChecked {get;set;}
        public PickListOptions(String label,boolean isChecked){
            this.label = label;
            this.isChecked = isChecked;
        }
    }
}
I have custom object 'Task'. and whant to achieve  this scenario:
On Monday morning, an email should go to each team member with the list of tasks that are due this week.
How to implemente this please guide.
Can we hide the field that is created at the time  of custom object creation
How to write cross object trigger in salesforce?
I have one checkbox in one of my custom object and 'Instalment field' in another custom object, if that checkbox is checked in then first object then take sum of all instalments in another object