Search code examples
c#dynamics-crmcrmunified-service-desk

Microsoft USD - Save parameters inside $Settings from C# Code


I want to save different parameters inside $Settings , since it is global and i want to use these values even when the session is transferred that is when it becomes null.

I am currently doing this,

var updatedContext = new Context(ctx)
{
[ContextParameterName] = ContextVals
}; 
FireChangeContext(new ContextEventArgs(updatedContext));

But through this i am only able to save values inside $Context. I want the values to be stored inside $Settings.

Looking forward to help.


Solution

  • You can achieve this through FireRequestAction

    FireRequestAction(new RequestActionEventArgs(<<HostedControl>>, <<ActionName>>, <<Your Data>>);
    

    Hosted Control will be Global Manager, Action will be SaveSetting and with that Data you want to store inside Settings.