Page 1 of 1
Remove a UDT on uninstall of a module
Posted: Thu Nov 05, 2015 9:02 am
by chunteler
Hi Everyone,
I'd like to know which code I can use to make sure a UDT is removed when a module in uninstalled. It is a UDT that gets created on installation of the same module.
Thanks in advance for your reply.
Greetings,
Re: Remove a UDT on uninstall of a module
Posted: Thu Nov 05, 2015 12:13 pm
by rotezecke
based on JoMorgs response (other thread) I'd try
Code: Select all
$usertagops = cmsms()->GetUserTagOperations();
$tagname = 'foo';
$usertagops->RemoveUserTag($tagname);
untested.
Re: Remove a UDT on uninstall of a module
Posted: Thu Nov 05, 2015 4:48 pm
by calguy1000
Just a silly question.... why is your module creating/removing UDT's ?
PHP code is what module actions are for.
You may want to check out the new (not yet announced) module writing tutorial that is available in the 'Advanced' section of the docs site.
Re: Remove a UDT on uninstall of a module
Posted: Mon Nov 09, 2015 2:27 pm
by chunteler
Thanks Rotezecke and Calguy1000.
I've now indeed realized I can much better use actions to do this.
Thanks anyway.