Page 1 of 1

get_field_value causes error 500

Posted: Tue Aug 27, 2024 2:54 pm
by WDJames
Hello,

I'm trying to save data from Smartforms to LISE using a UDT but found that "get_field_value" is causing an error 500. This used to work on previous versions of CMSMS but isn't on version 2.2.21. Below is my UDT so far:

Code: Select all

$data = $params['data'];

$mod = cmsms()->GetModuleInstance('LISEInstance');
if(!is_object($mod))
return;

$alias = $data->get_field_value('Alias');

$obj = $mod->LoadItemByIdentifier('alias', $alias);

$mod->SaveItem($obj);
Has anyone else come across the same issue and if so, were there any workarounds?

Thanks,

James

Re: get_field_value causes error 500

Posted: Wed Aug 28, 2024 11:48 am
by webform
It is possibly a bug in the UDT that executes the code when you save your UDT. (I have submitted a bug report)

I got around the problem by pasting my code directly into the code field of my SQL table.