How to get a mainservice fields value into the subservice?

By | November 15, 2013

Direct method its not possible. but you can use value-of-settings.

For Example:

Mainservice contains a field with id ‘firstname’.

using the below statement you can get the value into the configuration script of mainservice but you cannot get into the subservice configuration script.

$firstname=trim(getenv(“SETTINGS_firstname”));

use the value of settings in subservice field as below

</setting>
<setting type=”string” id=”firstname_subservice” value-of-setting=”firstname” visibility=”hidden” protected=”true”></setting>
</settings>

$firstname=trim(getenv(“SETTINGS_firstname_subservice”));// here you will get the value of mainservice.