A control add-in can raise events and from that events you can have a value.
For example, when you declare your controladdin object, add an event to the declaration:
controladdin demo
{
event MyAddinEvent;
}
Then in your D365BC page, when you declare the addin object, handle that event:
usercontrol(MyAddin;MyAddin)
{
trigger MyAddinEvent
begin
//Your code here
end;
}