Showing posts with label Point and Click. Show all posts
Showing posts with label Point and Click. Show all posts

Tuesday, October 17, 2023

Issue - Quick Text Is Not Showing Under The Selected Folder After It's Created In Salesforce


QuickText : As name suggest it's used to configure the commonly used sentences or streamline the agents responses in chat, email and phone call to speed up the closure of the case etc. These are similar to email templates only but can be used across the multiple channels.

Ideally while creating these Quicktext we will be selecting the folder where this should go and save so that we can provide the access to these QuickText for an user using the folder only.

We have identified one issue where even after the desired folder selected while creating the new Quicktext but these Quicktext not showing under selected folder it's going under all folder/all QuickText .

So ,quick fix for this to update the folder for all these Quicktext can be done either using the Apex code snippet or using the SOQL.

Go to folder where you want to place the QuickText and copy the folder id from the url .

Just run the query on QuickText object to get the all the templates where FolderId is blank or you can just query your QuickText by using the Name.


  List<QuickText> lisQtextToUpdate = new List<QuickText>();
  for (QuickText qt :[SELECT Id,Name,FolderId From QuickText WHERE FolderId= Null])
  {
    qt.FolderId = <Your Folder Id>;
    lisQtextToUpdate.add(qt);
  }

  if (!lisQtextToUpdate.isEmpty())
     update lisQtextToUpdate;


Happy Learning 😊


 Please comment or write us if you have any queries/requirements.


Please like,follow,bookmark,subscribe this site to receive daily updates.


FaceBook Page - I Love Coding. You?


Hope this helps you..Enjoy..!







Monday, October 16, 2023

How To Check The Given Email Field Value Is Present In The List Of Email Ids In Salesforce Workflow, Formula and Flows

The use case here is I want to check whether case email is available given in the list of email ids or not? If it's present in the list it will return true else it will return false.


IF(

   FIND(Your Email Filed,'test@gmail.com,man.6233@gmail.com,hello@haptik.co,
pk.kk@gmail.com,support@jugnoo.in,msj@gmail.com,mailer-daemon@amazonses.com,
sales@kks.com,l.dyj@licindia.com') > 0,TRUE,FALSE
 
 )

Example:

IF(

   FIND(SuppliedEMail,'test@gmail.com,man.6233@gmail.com,hello@haptik.co,
pk.kk@gmail.com,support@jugnoo.in,msj@gmail.com,mailer-daemon@amazonses.com,
sales@kks.com,l.dyj@licindia.com') > 0,TRUE,FALSE
 
 )



Saturday, July 16, 2022

How To Stop Workflow Rules and Outbound Messages in Sandbox Automatically

We have couple of outbound messages linked under the workflow rules and all these outbound message will send some of custom objects data and standard objects data to external systems everytime any kind of DML operation happens on these objects. 

Everything got set up and working as expected. But recently we have come across a situation where all the outbound messages are pushing data from sandboxes to same external systems assuming that we forgot to disable these workflow rules in sandbox before we activate it and somehow we missed to change the outbound messages end point from production to sandbox.

Because of all these things the sandbox data got messed up with the production data. So, we started exploring the options how can we stop all these Workflow rules automatically in sandbox or can we change the endpoint from production to stage automatically after refreshing the sandbox.

As a solution we come across multiple options but as a quick fix we have chosen to use the below solution.


1. Identify the environment like sandbox or production.

  • Use the username to identify this assuming we will add sandbox name in the end of username but in production we will not have any name after email Id.
  • Use the SOQL to identify the environment 
2. Assuming we have decided to move with username flow create a formula field on User Object as Checkbox. 

3. Assume formula field name as "isProduction__c" and this will get updated to true in case of if user in production env and else false in sandbox.

4. Use this field in all your workflow rule by adding CurrentUser under that select isProduction__c field.

Now all your workflow rules will get evaluated to true if the logged in user in production else the rule will not get satisfied so your Workflow rules will not get fired in sandbox. 

With this approach we don't need to worry about the disabling the workflow rules and changing the outbound messages endpoints to stage. We can use other options to as well but we thought this is simple and easy to implement for Admins too...

Happy Learning 😊 

Please comment or write us if you have any queries/requirements.

Please like,follow,bookmark,subscribe this site to receive daily updates.


FaceBook Page - I Love Coding. You?


Hope this helps you..Enjoy..!

Thursday, June 9, 2022

How can we setup different work item capacity for agents in Salesforce Omni-Channel

 Scenario:

Let's assume we have group of users assigned under the omni channel for handling of incoming chat request.
How can we set the different maximum chat limit for user basis on experience. Ex For new joiner we want to setup of maximum cap as 5 and others as 7 chats.

Solution:
Ideally in omni channel the agent capacity and which Omni-channels features can be accessed like auto decline or auto accept of the work items can be performed using the "Presence Configuration" settings.

So in our case also we can create two presence configurations ,one for the new joiners and second for the others. Under the new joiners configuration we will add all the new joiners so when they logged into Omni channel the chat capacity will be picked up from here automatically.



Please comment or write us if you have any queries/requirements.

Please like,follow,bookmark,subscribe this site to receive daily updates.


FaceBook Page - I Love Coding. You?


Hope this helps you..Enjoy..!

Wednesday, May 25, 2022

How to get the start date of the week for the given date in Salesforce

 If your trying to know the starting date of the week for the given date in salesforce please use the below 2 formats.


Using the Formula Fields:

The return type of the formula is date.

(Yourdatefield__c- MOD(Yourdatefield__c- DATE(1900, 1, 7), 7))

Using the Apex:

In case of apex we can use the salesforce in built date function called toStartofWeek() which returns the start date of week basis on the user locale.

  • Sunday will be treated as US locale
  • Monday in case of European locale

Date startWeek = Yourdatefield__c.toStartofWeek();

In my case given date is 20th Friday and start of the week will returns as 15th on Sunday


Please comment or write us if you have any queries/requirements.

Please like,follow,bookmark,subscribe this site to receive daily updates.




Tuesday, May 24, 2022

Salesforce Data Loader Log4j Vulnerability or Data Loader Installation Issues

Salesforce Data loader is a tool which will be used to insert, update, delete, export and hard delete salesforce objects data. As we know in recent times Log4j vulnerability caused a lot of issues on multiple systems.

Basically to run the data loader we must have JDK setup on your systems so a part of the this vulnerability data loader has started facing some issues. So, Salesforce has suggested to delete the existing data loader and to set up this again after downloading the latest version from salesforce setup which is not have these issues. 

While setting up this i have come across some of the java/jdk related issues and it's been sorted out with the help of the articles mentioned below. If anyone of facing same issue related to java/jdk setup you can refer the below posts for step by step process.

How to Install Azul Zulu OpenJDK Version 11 on Windows for data loader?

Install Azul Zulu on Windows


Please comment or write us if you have any queries/requirements.

Please like,follow,bookmark,subscribe this site to receive daily updates.




Hope this helps you..Enjoy..!


 

Tuesday, April 26, 2022

How to Stop Email-to-Case: Error(s) encountered while processing Error Emails

 In previous post we have clearly discussed about all the scenarios why all these emails comes .In this post we will be discussing how to stop receiving these emails from salesforce.

Please follow below steps to update the config.

  1. Go to Service Setup
  2. Search Process Automation -->Support Settings
  3. Click on Edit of Support Settings
  4. Find the "Automated Case User".


  • If it's selected as "System" 
  • Check the "Email for Automated Case User Notifications" field value might be our yours
Now if you want the keep the "Automated Case User " as System just keep that same and modify the email field of  "Email for Automated Case User Notifications" field with emailid of whom you want to send all these emails.

Even if you want to change the "Automated Case User " from System to User in this case the "Email for Automated Case User Notifications" will be marked as grayed out and all emails go to the selected user email address automatically.



Please comment or write us if you have any queries/requirements.

Please like,follow,bookmark,subscribe this site to receive daily updates.




Hope this helps you..Enjoy..!

Email-to-Case: Error(s) encountered while processing

Have you ever started receiving an email from Salesforce Support email ,the from address would be support@salesforce.com <support@salesforce.com> whenever there is an error while creating an email-to-case in salesforce.

One of the sample error email looks like as below



If your worrying why it's been been to you, the simple reason is that before we setup the email-to-case/support application we need to configure the Support Process in salesforce first.

If in this support process if your user has been configured as "Automated Case User" or Your email has configured as the "Email for Automated case user notifications " you will be get notified all the kind of system errors occurs on email-to-case process.



Please comment or write us if you have any queries/requirements.

Please like,follow,bookmark,subscribe this site to receive daily updates.




Hope this helps you..Enjoy..!



Thursday, May 6, 2021

Bot: Bot needs at least one Bot version.

You will receive this error while your deploying the Einstein bots from one org to another org. 


When you encounter this type of issue please cross check whether did you added the what version of the bot has to be deployed is added in the change set or not.

If not added just click on the view dependencies section of the change set and check for the bot version type and select the corresponding version.


 

Please comment or write us if you have any queries/requirements.

Please like,follow,bookmark,subscribe this site to receive daily updates.




Hope this helps you..Enjoy..!

Sunday, January 26, 2020

How To Access Custom Permission In Validation Rule and VF Pages

To refer the custom permissions assigned to users through permission sets/profles in validation rules/pages please use below code

In Validation Rules/VF Pages

$Permission.CustomPermissionApiName

Example:

$Permission.Srinivas_4SFDC

Please comment or write us if you have any queries/requirements.

Please like,follow,bookmark,subscribe this site to receive daily updates.




Hope this helps you..Enjoy..!

Custom Permissions Are Not Working In Apex

Lets assume you have created a custom permission and it's assigned to user through permission sets.

Now when your referring the same value in apex for the assigned user it's still giving a false instead of the true value .

This could be happening because of the  Session Activation Required setting is enabled on the permission set level.

Please disable this and try it out probably it should work.





Please comment or write us if you have any queries/requirements.

Please like,follow,bookmark,subscribe this site to receive daily updates.




Hope this helps you..Enjoy..!

How To Access Custom Permission in Apex

  • Let's assume you have created a custom permission and it's been assigned to permission set or profiles.
  • Now we can refer the same custom permission in apex to check whether it's enabled for logged in user or not.
  • We use will the checkPermission() method from the FeatureManagement class for the same.

Boolean enabSet = System.FeatureManagement.checkPermission('Custom Permission APi Name');
System.debug('enabSet..'+enabSet);

Example:
Boolean enabSet = System.FeatureManagement.checkPermission('SreeTest');
System.debug('enabSet..'+enabSet);

Please comment or write us if you have any queries/requirements.

Please like,follow,bookmark,subscribe this site to receive daily updates.



Hope this helps you..Enjoy..!

Friday, January 24, 2020

How To Configure Console Components In Lightning Console Applications

Unfortunately Salesforce doesn't support console components in lightning experience.

If your existing component is linked to a visual force page and then you want to use this component as a console component in lightning experience the workaround is below.

1. Goto Service Setup

2. Open the App Manager Under User Interface Section

3. Select the application where you want to add console component and Click on Edit

4. Select Utility Items Under App Settings



5. Click on Add Utility Items and Select Visual Force Page option

6. Please give console component name and it's related visual force page(your vf page is not shown)

7. Your component is ready and it's available in the bottom left.


Please comment or write us if you have any queries/requirements.

Please follow,bookmark,subscribe this site to receive daily updates.

Facebook - https://www.facebook.com/ILoveCodingYou/?ref=bookmarks

Hope this helps you..Enjoy..!

How To Disable The Switch To Lightning Experience For An User

If you want to disable to switch to lightning experience link a user ,please follow below steps.

1. Identify the list of users to whom you want to disable this feature

2.Find out all the profiles related to these list of users

3. Goto each profile and Click on Edit

4. Uncheck the Lightning Experience User setting under the Administrative Permissions.


5. Now users will not get this switch permission .

Note:

This entire flow what we discussed above will disable this feature for all the users under the same profile.

If you want to do it for specific user disable Lightning Exp User at profile completely and create a permission set with Lightning Experience User enabled and assign permission set to set of people who required this permission.


Please follow,bookmark,subscribe this site to receive daily updates.

Facebook - https://www.facebook.com/ILoveCodingYou/?ref=bookmarks


Hope this helps you..Enjoy..!

How To Restrict The Record Edit/Modification Access Only To Record Owner and System Admin

If you have a requirement like the record can only be modified either by the owner of the record or the system administration .Other than this if any user tried to modify the record we shouldn't allow them to modify it.

Please use the validation rule to achieve this with below conditions check.

AND( 
     NOT(ISNEW()),
     NOT(OR($Profile.Name == 'System Administrator', $User.Id == OwnerId))
   )


Please follow,bookmark,subscribe this site to receive daily updates.

Facebook - https://www.facebook.com/ILoveCodingYou/?ref=bookmarks


Hope this helps you..Enjoy..!

Thursday, January 12, 2017

What is Default Backend formats for Date and DateTime in Salesforce

Today I'm going to share an exiting hidden feature of salesforce. We will be using regularly date and datetime fields in salesforce. I will discuss few points about these fields now.

Scenario:

 I have one datetime field in my object which typically stores the date time .Now I have created one record in that object passing some date and time to that field.Lets assume that the value is 11 Jan 2017 and time as 3Am(03:00:00) .I have successfully created a record and my time zone is IST .
Now I open my developer console and trying to query the same record with the help of datetime(11Jan 2016 3Am) then my query ends up with no result.Why is it ?What happened?

Root Cause:

 Now I have taken some other field(Id or String) from same object to debug actually what happening in the backend and included this datetime field in query.The value for datetime field is showing some thing like 10 Jan 2017 and time as 9pm (21:30:00) but when I added same field to page layout or in visual force page I'm getting the 11 Jan 2017 and time as 3Am(03:00:00) .Then I went through many blogs and docs of salesforce and came to know that by default the Salesforce will stores all Date and Datetime fields in database in the format of Coordinated Universal Time (UTC) which also know as Greenwich Mean Time (GMT) and it will not consider what is the logged in user time zone.



Solution:

So due to above mentioned statement the converted value of IST 11 Jan 2017 and time as 3Am(03:00:00) will comes as 10 Jan 2017 and time as 9pm (21:30:00) because we are ahead of +5:30 compared to GMT/UTC.

So when you were working with date or datetime fields better you will make sure that you follow all these conversions to get the exact data.

Whenever showing these date or datetime fields in pagelayout or visual force page salesforce automatically converts that GMT/UTC value to logged in user respective timezone so that is the reason we are able to see 11 Jan 2017 and time as 3Am(03:00:00) on layouts and vf pages instead of 10 Jan 2017 and time as 9pm (21:30:00)

Salesforce already provides some internal date and datetime functions to make all these conversions.
We will see more details about all these functions in my next post.

Thanks for visiting..hope this helps you!









Wednesday, January 11, 2017

What is the Default Article Type for Salesforce Knowledge Base

When you enabled Salesforce Knowledge Base in your organisation then the default Article Type given by Salesforce will be Knowledge.

If you want create custom article types based on your Article purpose we can create and link your article for preferred article type.

Thanks for visiting..hope this helps you!


Friday, July 15, 2016

Limitations of @InvocableMethod annotation in Salesforce

@InvocableMethod:

This Annotation will be used whenever you want to invoke an apex method from the Process Builder then that method must be declared as @InvocableMethod ,otherwise it can't be accessed in Process Builder .@InvocableMethod annotation have some limitations when your using it.

Limitations of @InvocableMethod Annotation:

  • Invocable method will not accept more than one argument as a method parameter
  • Only static methods can be invocable methods
  • More than one invocable method is not allowed per class

Method with Invocable Annotation Example:

public class UserHistoryProcessor
{
   @InvocableMethod 
  public static void updateUserHistory(List<Id> userIds)
  {
    //related code here
  }
 
}


Thanks for visiting...Enjoy!

Salesforce Interview Questions -Compact Layouts

1. What is Compact Layout?

    The devices like in Mobile (Salesforce1) we will be running out with space constrains . So with the help of Compact Layouts we can  highlight the record key fields at glance .These layouts will help you to arrange necessary fields at record's highlight area.

2. If you haven't created compact layout what will happens in Salesforce1?

    It's not required to create a compact layout in salesforce .If you haven't created system will uses a predefined system generated read only compact layout

3. What fields will be included in default compact layouts?

    It will includes only Name field as part of compact layout

4. How many fields will be shown as part of record highlights section ?

   In Salesforce1 first 4 fields will be included
   In Lightning Experience first 5 fields will be included

5. How many fields you can add to Compact Layouts?

   10 fields

6. What are unsupported field types in compact layouts?
  • Text areas
  • Long text areas
  • Text areas
  • Multi-select pick lists
7. Can we assign different compact layouts to different users?
   
    No,only one compact layout will be assigned to all users

Thanks for visiting..hope this helps you!

Compact Layouts Salesforce Interview Questions

1. What is Compact Layout?

    The devices like in Mobile (Salesforce1) we will be running out with space constrains . So with the help of Compact Layouts we can  highlight the record key fields at glance .These layouts will help you to arrange necessary fields at record's highlight area.

2. If you haven't created compact layout what will happens in Salesforce1?

    It's not required to create a compact layout in salesforce .If you haven't created system will uses a predefined system generated read only compact layout

3. What fields will be included in default compact layouts?

    It will includes only Name field as part of compact layout

4. How many fields will be shown as part of record highlights section ?

   In Salesforce1 first 4 fields will be included
   In Lightning Experience first 5 fields will be included

5. How many fields you can add to Compact Layouts?

   10 fields

6. What are unsupported field types in compact layouts?
  • Text areas
  • Long text areas
  • Text areas
  • Multi-select pick lists
7. Can we assign different compact layouts to different users?
   
    No,only one compact layout will be assigned to all users

Thanks for visiting...Enjoy!