Email Template Dropdown Suddenly Changed

I went to edit an Event that already had an email template associated with it, but the ā€œEmail Invite Templateā€ field suddenly had a completely different dropdown list associated with it. What is the name of the dropdown list that should go with this field, and any idea how this could happen? All of the email templates are still there on the Email Templates page.

You can see what it should be here (demo1/demo1):

https://crm1.24datahosting.com/index.php?action=ajaxui#ajaxUILoc=index.php%3Fmodule%3DFP_events%26action%3DEditView%26return_module%3DFP_events%26return_action%3DDetailView

Hello,

Event’s email template is associated with the field invite_templates and app_list_string are dynamically updated from the file modules/FP_events/FP_events.php and the function name email_templates

Running

print_r(get_bean_select_array(true, 'EmailTemplate', 'name'));

tells me

$app_list_strings['email_templet_list']

is being set properly. So, any idea why the dropdown would suddenly display the account_type_dom list instead (which is first on the list of possible dropdown lists when editing the field in Studio)?

Could you do me a huge favor and look at what your invite_templates field info looks like in Studio and compare it with my screenshot here?
https://pasteboard.co/HPkPbb6.png


Array
(
    [] => 
    [273300d2-0b5c-bddc-eb58-5bb3e411ad2b] => Confirmed Opt In
    [3450feea-dd7c-3786-7294-5bb3e43c5aa9] => Case Closure
    [4184809f-f748-7783-8aaa-5bb3e46a9662] => Joomla Account Creation
    [5064c512-55c5-fe64-9781-5bb3e4c261cc] => Case Creation
    [6249aa70-be0f-da21-d5a1-5bb3e4d85eff] => Contact Case Update
    [6f9a7319-e3d2-f31f-ce7d-5bb3e4275c8e] => User Case Update
    [87fa47f4-39b6-9d5b-8a6f-5bb3e47e7c09] => Event Invite Template
)

Hello,
Aah, I understood your issue now.
ā€œemail_templet_listā€ definition is not stored in a language file because it load the dynamic value from the database. so it cannot load to display in Studio as it fetches a value from the language file. So whatever the first array it finds in language array it displays by default. You should not Edit or Save that field in Studio. Otherwise, it will overwrite the original definition of your Dropdown List name.

If you already save that value, it can be fixed but don’t do next time.
Remove file ,

Custom/Extension/modules/FP_events/Ext/Vardefs/sugarfield_invite_templates.php

then do Quick repair & rebuild. it will be restored the default definition of the field.

1 Like

Awesome sleuthing! That did it. I wanted that to remain a required field and was able to just comment out that ā€œoptionsā€ line, thanks to your suggestion.

Cheers!!