• vijaya kudupudi
  • NEWBIE
  • 115 Points
  • Member since 2015

  • Chatter
    Feed
  • 1
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 36
    Questions
  • 30
    Replies
Hi,

I want to find the day of paticular date e.g if my date is 28-jun-16 then my formula field should be written as thursday. How can i achieve this? please give me some suggestions.
Hi All,

I'm getting Mixed DML exception in future method.

Actually, In the case trigger i got a Mixed DML exception when i try to insert CaseteamtemplateMember. I have resolved that mixed dml exception by using future method and done the insertion of caseteamtemplatemember record in future method. But, now i need to insert another object record in the future method after inserting caseteamtemplatemember record, here again I'm getting Mixed Dml exception in future method.

Can some help me on this, if we can over come this error in future method?.

Thanks & Regards,
Vijaya K.
Hi All,

I'm able to update Opportunity record from the case object using action and relaeted record in lightning page. Now I'm trying to update Opportunity details from case record, then the opportunity record is getting updated successfully but flow on the case object to check the opportunity updated details is not firing.

When i verify the logs I can see only opportunity related flows are getting triggered not the case flows. Can some suggest me that how can I make the flow on the case object should run?.

Thanks & regards,
Vijaya
Hi,

I want to make accounts access is private and Opportunity, case should be public Read only to all the users in salesforce. but I'm not able to achieve this due to the standard salesforce behaviour. Below link for reference
https://help.salesforce.com/s/articleView?id=sf.faq_record_access.htm&type=5 

Can some one suggest me on this if is there any alternate way to achieve this?.

Thanks,
Vijaya
 
Hi 

My requirement is whenever an AccountTeamMember is deleted from the team then the related Opportunity Team Members also should be deleted. Through Flow I'm trying to do the this requirement.

Here, I'm querying the opportuinity records,   but I'm not able to pass those records/Id's to query OpportunityTeamMembers in flow. Someone can guide me how to pass pass list of Id's/values resulted from a query to another query in flows?
Hi,

I'm trying to Copy Account Team Members in to OpportunityTeam Member when ever the opportunity created/edited using flow.

while run and testing the flow I'm getting the below error.

The flow failed to access the value for AccountTeamLoop.TeamMemberRole because it hasn't been set or assigned.User-added image
Hi All,

I am getting the error message "We couldn't relate your event to this record. Please try again. Confirm to retry." when i try to attach the email through lightning for outlook. Can anybody help me on this? how can rectify this?
Hi All,

I want check the assigned permission set of the user in workflow. Based on the permission set assigned to the user i need to trigger an email. I have created the workflow on user object. I tried using custom permissions, using the below link .
https://help.salesforce.com/articleView?id=000221057&type=1
 but it is not working for me. Could anyone can clarify me can we use the custom permission on user object using workflow.

If if doesn't work can any one please provide the alternate solution. I want to check the assigned permission set of the user in workflow.
Hi All,

I have reassigned a approval record to a Queue from single user. But, the reassigned approval record is not showing in the Items to approve section of the approver home page. Anyone can help to overcome this.
Hi All,

I need to reassign current pending approval records to more than one users along with current user. I am able to query the approval record and able to update with one user, but not able to update with multiple users. Anyone can help on this. Either by using apex or any other way .
 
Hi All,

I have a Comments field of Type LongTextArea(Size 256). when i use this field in reports i am getting 253 characters and dots(..) . I am not even getting 254 characters. I just want to display full text from comments field. Any body can help me to solve this problem.
Hi All,

I would like to add Activity "Type" field on Past activity section in Account record in salesforce Lightning. How should i add this field on this layout ? Any one could help me to sort it out.See the below image for clarification.

User-added image
Hi All,

My visualforce page is not loading in Microsoft Edg Browser and it just displaying Blank white page. Kindly help me why it is not loading in this browser.
Hi All,

I have requirement to create dash board for opportunity with the condition of opportunites woned/opportunites woned +opportunites Lost. Any one can help to achieve this functionality in reports. 
Hi All,

One of my user facing trouble in accessing the Salesforce1 app throgh mobile. User is able to logging into salesforce successfully. But the user is not getting the salesforce1 mobile app look it is opening in the desktop view(looks like view of salesforce page in desktop). Any body can help me to resolve the issue.

Thanks in advance.
Hi all,

I want to restrict/hide/remove footer in email which is sending by using visualforce template. But I am getting footer which is saved in Organization-Wide Email Footer and from My Email Settings. But i want to give my own(common footer for all users) footer. How can i achieve this? Any one can help me? 
Hi all,

I want to get all dependent objects of a class (objects used in apexclass) using programming. As like salesforce standard functionality, if we click on "show dependencies" button we are getting all dependent components. How can i achieve this by programming ? 
Hi All,

I want to display image from richtext field on visulforce email template. When i give preview it is displaying images properly. But when i send a test mail it is not displaying images instead of that it is displaying  a text like "User-added image". How can i achieve this ?
Hi,

I want to lock my record using apex coding. I have tried using "Approval.LockResult[] lrList = Approval.lock(recordID);"  from the link(https://releasenotes.docs.salesforce.com/en-us/winter16/release-notes/rn_apex_approval_locks_unlocks.htm). But it's locked the record in API version 35 and it's not locking the record in API version 38. How can i acheve this ? Any one can help me ?
Hi all,

I have created the dynamic approval process on a custom object. In this i can able to send send one approval request. If i am trying to set one more approver id to req.setNextApproverIds(new Id[] {apl[1].approver__c}) method, I am getting exception. How can i send request to the second approver ? Please any body can help me.
Hi all,

I got a requirement like delete records based on criteria( to give the criteria i should take values from vf page), and I have to delete the records using batch class. And want to run this batch class once per month. How can i schedule this batch class. and i want get records list from batch class to controller class. Please anybody can help me.
//Controller class

public with sharing class DeleteSelectedRecords{
public List<Sobject> reclist {get;set;}
public List<SelectOption> options{get;set;}
public String Recname{get;set;}
public String selectedOpt{get;set;}
public boolean criteriaRend{get;set;}

public DeleteSelectedRecords(){
    reclist = new List<Sobject>();
    options = new List<SelectOption>();
    Map<String,Schema.sobjectType> objNames = Schema.getglobalDescribe();
    
    options.add(new SelectOption('--None--','--None--'));
    for(String s: objNames.keyset())
    {
        if(objNames.get(s).getDescribe().isAccessible()==True && objNames.get(s).getDescribe().isUpdateable()==True){
        options.add(new SelectOption(objNames.get(s).getDescribe().getLabel(),s));
        }
    }     
}

public void showpb(){
    if(selectedOpt!='--None--'){
        criteriaRend= true;
    }
}

public void getRecords(){
    //reclist = new List<Sobject>();
    String query = 'select id, name from '+selectedOpt+' where name='+'\''+Recname+'\'';
    deleteSubscribers ds = new deleteSubscribers(query);
    Id batchpid = Database.executeBatch(ds);
    System.debug('batchpid @@@'+batchpid );
    
    System.debug('ds.accountMap @@@'+ds.accountMap );
    reclist =ds.listrecord;
    System.debug('reclist @@@'+reclist );
    
}
}


 
//Batch class

global with sharing class deleteSubscribers implements Database.Batchable<sObject>,Database.Stateful{
    global final String Query;
    global List<Sobject> listrecord{get;set;}
    global Map<Id, sObject> accountmap;

    
    global deleteSubscribers(String q){
    accountmap = new Map<Id, Account> ();
    listrecord = new List<Sobject>();
    System.debug('query @@@'+q);
        Query=q;
    }

    global Database.QueryLocator start(Database.BatchableContext BC){
        return Database.getQueryLocator(query);
    }

    global void execute(Database.BatchableContext BC,List<Sobject> scope){
       // listrecord = new List<Sobject>();
        listrecord = scope;
        System.debug('BatchableContext@@@'+BC);
        System.debug('sCOPE listrecord  @@@'+listrecord );
        for(Sobject s:scope){
            accountmap.put(s.id,s);
        }
        System.debug('accountmap @@@'+accountmap);
        delete scope;
        System.debug('accountmap @@@'+accountmap);
        
    }

    global void finish(Database.BatchableContext BC){}
}
 
//VF page
<apex:page controller="DeleteSelectedRecords">
<apex:pagemessages ></apex:pagemessages>
<apex:form >
<apex:pageblock >

    <apex:pageBlockSection Title="Select Object" >
        <apex:selectList size="1" value="{!selectedOpt}"  label="Select the object">
            <apex:selectOptions value="{!options}"  />
            <apex:actionSupport event="onchange"  rerender="crsh" action="{!showpb}"/>
        </apex:selectList>  
    </apex:pageBlockSection>
    <apex:pageBlockSection Title="Enter criteria"  id="crsh">
        Enter criteria to delete records!
        <apex:inputText label="Record name is equalto" value="{!recName}"  rendered="{!criteriaRend}" />
       <center> <apex:commandButton action="{!getRecords}" value="Get Records"  rendered="{!criteriaRend}"/></center>
    </apex:pageBlockSection>
    <apex:pageblocksection title="Selected Records to be Deleted" rendered="{!criteriaRend}" columns="1">
       <apex:pageBlockTable value="{!reclist}" var="rec" rendered="{!if(reclist.size==0,false,true)}">
            <apex:column headerValue="Id"><apex:outputText value="{!rec.id}"/></apex:column>
        </apex:pageBlockTable>

    </apex:pageblocksection>
</apex:pageblock>
</apex:form>
</apex:page>

 
Hi All,

I would like to add Activity "Type" field on Past activity section in Account record in salesforce Lightning. How should i add this field on this layout ? Any one could help me to sort it out.See the below image for clarification.

User-added image
Hi,

I want to make accounts access is private and Opportunity, case should be public Read only to all the users in salesforce. but I'm not able to achieve this due to the standard salesforce behaviour. Below link for reference
https://help.salesforce.com/s/articleView?id=sf.faq_record_access.htm&type=5 

Can some one suggest me on this if is there any alternate way to achieve this?.

Thanks,
Vijaya
 
Hi 

My requirement is whenever an AccountTeamMember is deleted from the team then the related Opportunity Team Members also should be deleted. Through Flow I'm trying to do the this requirement.

Here, I'm querying the opportuinity records,   but I'm not able to pass those records/Id's to query OpportunityTeamMembers in flow. Someone can guide me how to pass pass list of Id's/values resulted from a query to another query in flows?
Hi,

I'm trying to Copy Account Team Members in to OpportunityTeam Member when ever the opportunity created/edited using flow.

while run and testing the flow I'm getting the below error.

The flow failed to access the value for AccountTeamLoop.TeamMemberRole because it hasn't been set or assigned.User-added image
Hi All,

I am getting the error message "We couldn't relate your event to this record. Please try again. Confirm to retry." when i try to attach the email through lightning for outlook. Can anybody help me on this? how can rectify this?
Hi All,

I want check the assigned permission set of the user in workflow. Based on the permission set assigned to the user i need to trigger an email. I have created the workflow on user object. I tried using custom permissions, using the below link .
https://help.salesforce.com/articleView?id=000221057&type=1
 but it is not working for me. Could anyone can clarify me can we use the custom permission on user object using workflow.

If if doesn't work can any one please provide the alternate solution. I want to check the assigned permission set of the user in workflow.
Hi All,

I need to reassign current pending approval records to more than one users along with current user. I am able to query the approval record and able to update with one user, but not able to update with multiple users. Anyone can help on this. Either by using apex or any other way .
 
Hi All,

I would like to add Activity "Type" field on Past activity section in Account record in salesforce Lightning. How should i add this field on this layout ? Any one could help me to sort it out.See the below image for clarification.

User-added image
Hi All,

I have requirement to create dash board for opportunity with the condition of opportunites woned/opportunites woned +opportunites Lost. Any one can help to achieve this functionality in reports. 
Hi all,

I want to get all dependent objects of a class (objects used in apexclass) using programming. As like salesforce standard functionality, if we click on "show dependencies" button we are getting all dependent components. How can i achieve this by programming ? 
Hi All,

I want to display image from richtext field on visulforce email template. When i give preview it is displaying images properly. But when i send a test mail it is not displaying images instead of that it is displaying  a text like "User-added image". How can i achieve this ?
Hi,

I want to lock my record using apex coding. I have tried using "Approval.LockResult[] lrList = Approval.lock(recordID);"  from the link(https://releasenotes.docs.salesforce.com/en-us/winter16/release-notes/rn_apex_approval_locks_unlocks.htm). But it's locked the record in API version 35 and it's not locking the record in API version 38. How can i acheve this ? Any one can help me ?
Hi,

I want to find the day of paticular date e.g if my date is 28-jun-16 then my formula field should be written as thursday. How can i achieve this? please give me some suggestions.
Hi all,

I have created the dynamic approval process on a custom object. In this i can able to send send one approval request. If i am trying to set one more approver id to req.setNextApproverIds(new Id[] {apl[1].approver__c}) method, I am getting exception. How can i send request to the second approver ? Please any body can help me.
Hi all,

I got a requirement like delete records based on criteria( to give the criteria i should take values from vf page), and I have to delete the records using batch class. And want to run this batch class once per month. How can i schedule this batch class. and i want get records list from batch class to controller class. Please anybody can help me.
//Controller class

public with sharing class DeleteSelectedRecords{
public List<Sobject> reclist {get;set;}
public List<SelectOption> options{get;set;}
public String Recname{get;set;}
public String selectedOpt{get;set;}
public boolean criteriaRend{get;set;}

public DeleteSelectedRecords(){
    reclist = new List<Sobject>();
    options = new List<SelectOption>();
    Map<String,Schema.sobjectType> objNames = Schema.getglobalDescribe();
    
    options.add(new SelectOption('--None--','--None--'));
    for(String s: objNames.keyset())
    {
        if(objNames.get(s).getDescribe().isAccessible()==True && objNames.get(s).getDescribe().isUpdateable()==True){
        options.add(new SelectOption(objNames.get(s).getDescribe().getLabel(),s));
        }
    }     
}

public void showpb(){
    if(selectedOpt!='--None--'){
        criteriaRend= true;
    }
}

public void getRecords(){
    //reclist = new List<Sobject>();
    String query = 'select id, name from '+selectedOpt+' where name='+'\''+Recname+'\'';
    deleteSubscribers ds = new deleteSubscribers(query);
    Id batchpid = Database.executeBatch(ds);
    System.debug('batchpid @@@'+batchpid );
    
    System.debug('ds.accountMap @@@'+ds.accountMap );
    reclist =ds.listrecord;
    System.debug('reclist @@@'+reclist );
    
}
}


 
//Batch class

global with sharing class deleteSubscribers implements Database.Batchable<sObject>,Database.Stateful{
    global final String Query;
    global List<Sobject> listrecord{get;set;}
    global Map<Id, sObject> accountmap;

    
    global deleteSubscribers(String q){
    accountmap = new Map<Id, Account> ();
    listrecord = new List<Sobject>();
    System.debug('query @@@'+q);
        Query=q;
    }

    global Database.QueryLocator start(Database.BatchableContext BC){
        return Database.getQueryLocator(query);
    }

    global void execute(Database.BatchableContext BC,List<Sobject> scope){
       // listrecord = new List<Sobject>();
        listrecord = scope;
        System.debug('BatchableContext@@@'+BC);
        System.debug('sCOPE listrecord  @@@'+listrecord );
        for(Sobject s:scope){
            accountmap.put(s.id,s);
        }
        System.debug('accountmap @@@'+accountmap);
        delete scope;
        System.debug('accountmap @@@'+accountmap);
        
    }

    global void finish(Database.BatchableContext BC){}
}
 
//VF page
<apex:page controller="DeleteSelectedRecords">
<apex:pagemessages ></apex:pagemessages>
<apex:form >
<apex:pageblock >

    <apex:pageBlockSection Title="Select Object" >
        <apex:selectList size="1" value="{!selectedOpt}"  label="Select the object">
            <apex:selectOptions value="{!options}"  />
            <apex:actionSupport event="onchange"  rerender="crsh" action="{!showpb}"/>
        </apex:selectList>  
    </apex:pageBlockSection>
    <apex:pageBlockSection Title="Enter criteria"  id="crsh">
        Enter criteria to delete records!
        <apex:inputText label="Record name is equalto" value="{!recName}"  rendered="{!criteriaRend}" />
       <center> <apex:commandButton action="{!getRecords}" value="Get Records"  rendered="{!criteriaRend}"/></center>
    </apex:pageBlockSection>
    <apex:pageblocksection title="Selected Records to be Deleted" rendered="{!criteriaRend}" columns="1">
       <apex:pageBlockTable value="{!reclist}" var="rec" rendered="{!if(reclist.size==0,false,true)}">
            <apex:column headerValue="Id"><apex:outputText value="{!rec.id}"/></apex:column>
        </apex:pageBlockTable>

    </apex:pageblocksection>
</apex:pageblock>
</apex:form>
</apex:page>

 
I am getting System.JSONException: Malformed JSON: Expected '{' at the beginning of object exception when i am trying to call callouts in my test class. I used the link (https://developer.salesforce.com/blogs/developer-relations/2013/03/testing-apex-callouts-using-httpcalloutmock.html) to call callouts in my test class. Please Anybody can give solution.

 
Hi all,

I have a requirement, whenever user login into salesforce it should display one popup with lead status. I made my visualforce page as default landing page(setup --> create --> apps -->edit)
Default Landing Tab --> (LeadHome)My Visualforce page.
But it is not displaying my VF page whenever I login into salesforce. Any one please help me.