Optional parameter in extension

Optional parameter in extension

  
Hi,

I'm trying to add an optional boolean parameter to an already existant extension, so that it won't afect all espaces that are working with it.

But, in C# there aren't optional paramenters (I think). You have to overload the function. And so I have. But now, it doesn't pass the compilation stage in Service Center. Is it possible to have an overloaded function in an extension?

regards

Gonçalo
Hello Gonçalo,

There is no need to overload the function. All you need to do is add a new optional parameter (unchecked 'Is Mandatory' box) in the Action definition and upload the new extension DLL in Service Center. To update the eSpace referencing the extension, download and re-publish it using Service Studio. Other eSpaces that depend on the extension will continue to run using the old extension version until the reference is updated (using the download & re-publish steps described). Note that there is only one method in the extension's implementation and that the default value will be used on the optional parameter if not specified.

Best regards,
Paulo Almeida
Thanks Paulo

regards

Gonçalo