Ever wonder how (or where) CRM stores the related values for pick lists or Option set ?
Answer is in String Map Table
So what is string map table actually means in CRM?
String map table basically used in MSCRM for storing the details of Option Set Fields exists in an organization. It contains all the data (Attribute Name, Option Set name, option value , option name, Object Type Code) of option set.
Let’s take one requirement to clear the use of StringMap table, requirement is like:
“Show the incident by status Name”
like: "CAS-T4R4F-U7Y6T5" shown status as "Problem Solved"
So in this scenario if we will have no string map table then either you need records which contain all the distinct type of record by status or you need hard code value use in report query.
By String Map table you can join the table and can collect all the status present in incident and can collect records number by grouping of them.
So this type of many scenarios can be fulfill by this table
Result of Case with Status Without using Stringmap Table :
Result of Case with Status using Stringmap Table :
Query :
select INC.TicketNumber[Case ID],SMT.Value[Status Name], SMT.AttributeValue[Status Value]
from incident as INC inner join StringMapBase as SMT
on INC.StatusCode = SMT.AttributeValue
where SMT.AttributeName='statuscode' and SMT.ObjectTypeCode=112
from incident as INC inner join StringMapBase as SMT
on INC.StatusCode = SMT.AttributeValue
where SMT.AttributeName='statuscode' and SMT.ObjectTypeCode=112