function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DeepVDeepV 

sql table to salesforce object mapping fields

Hi Friends,

I have a table (Detail) in SQL and creating a custom object in Salesforce (Detail__c). 
Below are the fields in SQL Detail Table:
User-added image

WIll they be a picklist? But how can I relate Detail_Acc_no, Description, TYpe and Detail_account_class all in one picklist? How can this be structured?


TIA

 
Best Answer chosen by DeepV
Malni Chandrasekaran 2Malni Chandrasekaran 2
DeepV,
You may create two dependent picklist for Details_Acc_No and Description with 1 to 1 correspondance and hide Details_Acc_No from users.  

You may also use single picklist for both the fields. From Spring '17 release, Picklist can be represented as Key-Value pair(Label and API Name).
Please refer
https://developer.salesforce.com/blogs/developer-relations/2017/01/keeping-picklist-integrations-safe-using-api-names.html
Hope this helps!

All Answers

Sarabdeep Singh AhluwaliaSarabdeep Singh Ahluwalia
Hi DeepV,

If the values in the fields Description, Type and Detail_account_class are generic and repeat across rows, you should create picklists for each of them. When you are creating a record in the Detail__c object, you can chose the corresponding values from the picklists.

As for Detail_Acc_No, it can either be a auto number field or a lookup field.

Hope this answers your question.

Thanks,
Sarabdeep
 
DeepVDeepV
Thanks for the reaply SarabDeep. They don't repeat, I'm not worried about the Detail_ID (PK).  However, my concern is about Detail_Acc_No and Its Description, how can I map them in salesforce they are 1:1. ex: 100 indicates Depository Operating  and vice versa.
Sarabdeep Singh AhluwaliaSarabdeep Singh Ahluwalia
In that case you should keep them as text fields. I am not sure if I understand what you mean by "1:1 in salesforce". 
Malni Chandrasekaran 2Malni Chandrasekaran 2
DeepV,
You may create two dependent picklist for Details_Acc_No and Description with 1 to 1 correspondance and hide Details_Acc_No from users.  

You may also use single picklist for both the fields. From Spring '17 release, Picklist can be represented as Key-Value pair(Label and API Name).
Please refer
https://developer.salesforce.com/blogs/developer-relations/2017/01/keeping-picklist-integrations-safe-using-api-names.html
Hope this helps!
This was selected as the best answer