Announcement

Collapse
No announcement yet.

Missing options - Enum type field

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Missing options - Enum type field

    Hi,
    I have some fields in the Opportunity Entity of type Enum and I've just noticed that there are no "options" available to list.
    Click image for larger version

Name:	image.png
Views:	55
Size:	16.1 KB
ID:	102497


    but when I create a record, I can see them. The field is "Lead Source"​​
    Click image for larger version

Name:	image.png
Views:	102
Size:	28.5 KB
ID:	102496

    My question is: where are these options supposed to be?

    Thanks​

  • #2
    Which version of EspoCRM are you using?

    E.g. in version 7.2.7 you can not see where the option come from but starting with version 7.5.0 you can reuse options from other fields. Then you can see that the options come from the entity "Lead" and the field "source".

    Comment


    • #3
      Hey,

      In Opportunity the leadSource field inherits the options from the Lead entity - field source. see the code below for the leadSource

      PHP Code:
      "leadSource": {
          
      "type""enum",
          
      "view""crm:views/opportunity/fields/lead-source",
          
      "customizationOptionsDisabled"true,
          
      "optionsReference""Lead.source"
      },​ 

      You see the option "optionsReference": "Lead.source" that tells the system that option list of this field is coming from the Lead.source also customizationOptionsDisabled: true means you can't customise the options of the field. You can always customise this field if you want different value, create a new field leadSource under custom/Resources/matadata/entityDefs/Opportunity.json as below

      PHP Code:
      "leadSource": {
          
      "type""enum"
      },​ 

      This will allow you set up the options and have access to all the enum field features.

      Comment

      Working...
      X