문제

I was creating the Recruitment App with Salesforce by going through the study material. I have a question. In the custom object, I saw that I have created a Standard field named "Position Title" and after that I have to create all other fields as "Custom Field & RelationShips". My question is -> Is it the case that Position title is the primary key/unique identified in this object? If that is the case, why the data type is Text(80)? I can have two records with same Position Title "Sr. Manager", right? In that case, my primary key/unique constraint violates.

I have attached the screenshot below: enter image description here

I am new to salesforce. So please help me in understanding the system? Thanks in advance

도움이 되었습니까?

해결책

Salesforce always create by default a group of fields called 'Standard fields', such as Created date, Last modified Date or Owner. In that list you'll probably interested in two, Id what is the primary key/unique identifier and Name which is a Text(80) field that you can't modify (only define if it's going to be text or an autonumber).

So to answer your first question, Name is actually not unique nor you identifier, and unfortunately at the moment salesforce doesn't give an easy option to have this functionality, in order to achieve that you could write a trigger with that restriction or define the Name as an autonumber and add the position title as a custom field with the unique checkbox marked.

The only problem with that last implementation is that the Name field is a special one with some behavior associated with it and it might obscure some of this functionality. For example, it will be the field shown when adding a relation to that object or in case you add the field to a related list, it will include a link to the actual object, but it will show the autonumber instead of the position title what doesn't give much information about the related object.

Here's a link with other people asking for the same idea.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top