Salesforce

Salesforce
Salesforce

Monday, August 23, 2021

Tilde (~) Magic in Excel

No matter what we do as an IT professional, MS Excel is something we can't imagine a day without. Yes, I do love working with Excel and hope you too.

Have you ever tried finding or filtering columns by a '?' or an '*' sign in your Excel sheet? please try you will enjoy it.

There are some wildcard characters (i.e. '?', '*'), and they have a different meaning inside Excel. For example the '?' character behaves like a wildcard that could mean any single character.

  • ? = a
  • ? = Z
  • ?? = 1c

Sometimes we want the '?' to be treated as a normal character, not a wildcard. We might need to find all the '?' entries in my Excel sheet and replace them with some other character/string, or probably we need to filter a Column to find out how many rows got '?' as value.

Tiled '~' is the lifesaver.

Trust me, next time you need to find '?' or '*' or '~' itself. Try clubbing these special characters prefixed with '~' sign and then do a Find or Filter.

Example: instead of finding '?' find '~?', and for '~' try '~~'


Thanks


Friday, January 16, 2015

Restrict duplicate record entries on junction object (Many-to-Many Relationship)


In various business scenarios, we find need of creating a many-to-many relationship in salesforce between two objects to allow each record of one object to be linked with multiple records from another object and vice versa.

To do so we create a junction object with two master-detail relationships, and we log the junction record entries in salesforce to link records from both the master objects.

Imagine a scenario, we log multiple junction record entries having the same set of master records!

Considering an example with A1 an Account record and C1 a Customer record. We can create multiple customer account (CA) records having same A1 and C1 referencing.


Below are some basic salesforce administrative steps to restrict the duplicate entries:
  •           Create a custom filed (i.e. “UID”) on junction object with "Text" data type and “Unique” and “Case Sensitive” option checked.
  •           Set the filed level security for “UID” and make it read only for all the profiles.
  •           Create a workflow rule for field update on junction object.
  •           Update the “UID” filed value through the workflow, by appending the “Account ID” and “Customer ID” value.
  •           And that's all!

Now whenever any user tries to log a duplicate entry, salesforce will restrict it by showing an error message referring to "UID" filed.