The SalesLogix web client has a couple of locations that they have a button to add a user time stamp within a memo field. For instance, on the standard Ticket Extended Details, on the Problem and Solution fields. If you look at these buttons they are actually executing a Sage Business rule called “AddTicketSolutionTimeStamp” or “AddTicketProblemTimeStamp”. These business rules actually prefixes the data already in the solution or problem with a user and date time stamp in the format of “Lee Hogan 2/9/2010 12:40:18 PM (Central Standard Time)”.
This time stamp would be a useful feature to use elsewhere but since this is built into a standard Sage business rule on the Ticket you can’t simply call these business rules. However, if we dig into one of the business rule using reflector we can see that if utilizes the Sage.SalesLogix.BusinessRule class in the Business Rule assembly to actually get the time stamp:
The fully qualified path to the rule is “Sage.SalesLogix.BusinessRules.BusinessRuleHelper.AddUserDateTimeStamp()”
Luckily this Business Rule Helper is an exposed method. Sage has a bad habit of not publically exposing some helpful rules but in this case we have lucked out. So with this method available to us we can use it somewhere to add our own user time stamp like:
Sage.Entity.Interfaces.IWidget widget = this.BindingSounrce.Current as Sage.Entity.Interfaces.IWidget;
if(widget.Notes != null) widget.Notes = Sage.SalesLogix.BusinessRule.BusinessRulesHelper.AddUserDateTimeStamp() + System.Environment.NewLine + widget.Notes;