-
ChatterFeed
-
1Best Answers
-
1Likes Received
-
0Likes Given
-
36Questions
-
30Replies
How to get Day of created date using formula field
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.
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.
- Sami Shakith
- July 28, 2016
- Like
- 0
- Continue reading or reply
getting Mixed DML exception in Future method
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.
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.
- vijaya kudupudi
- August 18, 2023
- Like
- 0
- Continue reading or reply
when update the parent record from the related record of child object, then the flow on the child object is not f triggering
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
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
- vijaya kudupudi
- September 01, 2022
- Like
- 0
- Continue reading or reply
How to make accounts are private and Opportunity, case should be public Read only in salesforce
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
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
- vijaya kudupudi
- April 12, 2022
- Like
- 0
- Continue reading or reply
how to pass list of Id's/values resulted from a query to another query in flows ?
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?
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?
- vijaya kudupudi
- March 03, 2022
- Like
- 0
- Continue reading or reply
The flow failed to access the value for AccountTeamLoop.TeamMemberRole because it hasn't been set or assigned.
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.
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.
- vijaya kudupudi
- March 02, 2022
- Like
- 0
- Continue reading or reply
We couldn't relate your email to this record. Please try again. Confirm to retry."
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?
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?
- vijaya kudupudi
- May 02, 2018
- Like
- 0
- Continue reading or reply
how to use custom permission on user object
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.
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.
- vijaya kudupudi
- April 11, 2018
- Like
- 0
- Continue reading or reply
record is not showing in items to approve section while reassign to a queue
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.
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.
- vijaya kudupudi
- February 23, 2018
- Like
- 0
- Continue reading or reply
reassign approval records to multiple users
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 .
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 .
- vijaya kudupudi
- February 22, 2018
- Like
- 0
- Continue reading or reply
getting 253 characters only in comments field in a salesforce report ?
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.
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.
- vijaya kudupudi
- December 06, 2017
- Like
- 0
- Continue reading or reply
Add Type field on Past Activity on Account record in sales force Lightning
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.
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.
- vijaya kudupudi
- October 31, 2017
- Like
- 1
- Continue reading or reply
visual force page is not loading in microsoft edge
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.
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.
- vijaya kudupudi
- October 11, 2017
- Like
- 0
- Continue reading or reply
how find percentage in report based on opportunity stage in reports
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.
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.
- vijaya kudupudi
- September 13, 2017
- Like
- 0
- Continue reading or reply
getting desktop look in salesforce1 mobile app
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.
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.
- vijaya kudupudi
- June 07, 2017
- Like
- 0
- Continue reading or reply
how to remove footer in visualforce template ?
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?
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?
- vijaya kudupudi
- January 21, 2017
- Like
- 0
- Continue reading or reply
How to get dependent objects of a class?
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 ?
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 ?
- vijaya kudupudi
- January 18, 2017
- Like
- 0
- Continue reading or reply
how to display richtextfield in on visualforce Template?
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 ?
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 ?
- vijaya kudupudi
- November 01, 2016
- Like
- 0
- Continue reading or reply
how to lock record ?
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 ?
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 ?
- vijaya kudupudi
- October 25, 2016
- Like
- 0
- Continue reading or reply
how to set second level approver for a record using apex coding in approval process
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.
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.
- vijaya kudupudi
- June 17, 2016
- Like
- 0
- Continue reading or reply
how to schedule a batch class which is getting values from vf page
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.
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>
- vijaya kudupudi
- June 10, 2016
- Like
- 0
- Continue reading or reply
Add Type field on Past Activity on Account record in sales force Lightning
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.
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.
- vijaya kudupudi
- October 31, 2017
- Like
- 1
- Continue reading or reply
How to make accounts are private and Opportunity, case should be public Read only in salesforce
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
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
- vijaya kudupudi
- April 12, 2022
- Like
- 0
- Continue reading or reply
how to pass list of Id's/values resulted from a query to another query in flows ?
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?
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?
- vijaya kudupudi
- March 03, 2022
- Like
- 0
- Continue reading or reply
The flow failed to access the value for AccountTeamLoop.TeamMemberRole because it hasn't been set or assigned.
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.
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.
- vijaya kudupudi
- March 02, 2022
- Like
- 0
- Continue reading or reply
We couldn't relate your email to this record. Please try again. Confirm to retry."
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?
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?
- vijaya kudupudi
- May 02, 2018
- Like
- 0
- Continue reading or reply
how to use custom permission on user object
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.
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.
- vijaya kudupudi
- April 11, 2018
- Like
- 0
- Continue reading or reply
reassign approval records to multiple users
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 .
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 .
- vijaya kudupudi
- February 22, 2018
- Like
- 0
- Continue reading or reply
Add Type field on Past Activity on Account record in sales force Lightning
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.
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.
- vijaya kudupudi
- October 31, 2017
- Like
- 1
- Continue reading or reply
how find percentage in report based on opportunity stage in reports
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.
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.
- vijaya kudupudi
- September 13, 2017
- Like
- 0
- Continue reading or reply
How to get dependent objects of a class?
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 ?
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 ?
- vijaya kudupudi
- January 18, 2017
- Like
- 0
- Continue reading or reply
how to display richtextfield in on visualforce Template?
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 ?
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 ?
- vijaya kudupudi
- November 01, 2016
- Like
- 0
- Continue reading or reply
how to lock record ?
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 ?
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 ?
- vijaya kudupudi
- October 25, 2016
- Like
- 0
- Continue reading or reply
How to get Day of created date using formula field
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.
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.
- Sami Shakith
- July 28, 2016
- Like
- 0
- Continue reading or reply
how to set second level approver for a record using apex coding in approval process
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.
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.
- vijaya kudupudi
- June 17, 2016
- Like
- 0
- Continue reading or reply
how to schedule a batch class which is getting values from vf page
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.
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>
- vijaya kudupudi
- June 10, 2016
- Like
- 0
- Continue reading or reply
System.JSONException: Malformed JSON: Expected '{' at the beginning of object
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.
- vijaya kudupudi
- December 23, 2015
- Like
- 0
- Continue reading or reply
How to dislay show custom visualforce page as default page(home page) after login into salesforce ?
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.
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.
- vijaya kudupudi
- December 14, 2015
- Like
- 0
- Continue reading or reply