Try getting it from custom workflow activity like:-
public class GetCurrentPSTTime : CodeActivity
{
[Output("Current PST Time")]
public OutArgument<String> CurrentPSTTime { get; set; }
protected override void Execute(CodeActivityContext context)
{
CurrentPSTTime.Set(context, DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"));
}
}
Regards Faisal
Faisal,
Isn't following easier:
public class GetCurrentPSTTime : CodeActivity
{
[Output("Current PST Time")]
public OutArgument<DateTime> CurrentPSTTime { get; set; }
protected override void Execute(CodeActivityContext context)
{
CurrentPSTTime.Set(context, DateTime.Now);
}
}
But this will work in workflows only. What if it is JavaScript? :) That's why I asked where topicstarter needs that value.
Dynamics CRM/Business Solutions MVP
Read My blog