Creating a call log from code

We use a post processing BPM which is called from a pre processing one.  We use it in the HelpDesk.Update method. We use it when either the owner of the case changes or the status (we have some custom stati like "Waiting for Customer")

So the Pre processing condition was if a field particular changed from any to any  in the Helpdesk dataset The action calls post processing directive.
Post processing directive action is custom ABL that finds the last call for the what ever object you are putting a call against and increment it if required. In our case it is the HDCASE

 This works out what the call sequence number is going to be.  Then uses Create CRMCall to create the call.
See below for some half/half code (pseudo and ABL)

define a variable for the call seq number
Find the last call sequence number for the given object. if it exists then assign it to the variable if not set it to 0

Create the Call
for each ttHDCase, each HDCase no-lock
    where (ttHDCase.Company = HDCase.Company) and (ttHDCase.HDCaseNum = HDCase.HDCaseNum).
    Create CRMCall.

/*assign values to the key fields*/
        CRMCall.Company = ttHDCase.Company.
        CRMCall.Key1 = string(ttHDCase.HDCaseNum).
        CRMCall.Key2 = string(ttHDCase.CustNum).
        CRMCall.Key3 = ''.
        CRMCall.RelatedToFile = 'hdcase'.
        CRMCall.CallSeqNum = INTLastCallSeqNo + 1.
end.
We found it useful to display some messages for testing purposes in the code. To do this we used

/*{lib/PublishInfoMsg.i &InfoMsg = "'Added Call ' + string(CRMCall.CallSeqNum) + ' to Case ' + CRMCall.Key1 + '.' + CHR(13) + 'Old Status= ' + HDCase.ShortChar06 + CHR(13) + 'New Status = ' + HDCase.ShortChar05"}.*/
 and commented it out later.

I hope this helps.

Simon

Has anyone written anything to create a call log directly from code? I would like to record certain changes to the SO form to a call log, and would prefer not to reinvent the proverbial wheel if I can avoid it!

 

Regards,

 

Tom Christie |  Information Technology Manager  |  AGM Container Controls, Inc.  |   tchristie@...  | t: 520.881.2130 ext 2176

 

I am not sure what you mean by a call log, but Epicor does already have a change log (kind of messy to read) – have you checked into that option?

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Tom J. Christie
Sent: Wednesday, January 15, 2014 5:59 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Creating a call log from code

 

 

Has anyone written anything to create a call log directly from code? I would like to record certain changes to the SO form to a call log, and would prefer not to reinvent the proverbial wheel if I can avoid it!

 

Regards,

 

Tom Christie |  Information Technology Manager  |  AGM Container Controls, Inc.  |   tchristie@...  | t: 520.881.2130 ext 2176

 

I do this in a couple places with a BPM that basically just concatenates the following string to the Character## field I am using:

 

XXX.Character## = string(Today) + CHR(009) + String(Time, "HH:MM") + CHR(009) + "Memo From: " + CAPS(ttCallContextClient.CurrentUserId) + CHR(13) + CHR(10) + CHR(009) + <Whatever else you need>

 

Keep in mind, this is not for a log that is going to grow to a large size.  This was just a “visual” so that people could see what was happening in a short process.  This particular one follows an order thru shipment, so everyone knows where it is at quickly.  The ASCII characters helped to “Format” the Character field.

 

Brenda

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Karen Schoenung
Sent: Thursday, January 16, 2014 9:28 AM
To: vantage@yahoogroups.com
Subject: [Vantage] RE: Creating a call log from code

 

 

I am not sure what you mean by a call log, but Epicor does already have a change log (kind of messy to read) – have you checked into that option?

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Tom J. Christie
Sent: Wednesday, January 15, 2014 5:59 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Creating a call log from code

 

 

Has anyone written anything to create a call log directly from code? I would like to record certain changes to the SO form to a call log, and would prefer not to reinvent the proverbial wheel if I can avoid it!

 

Regards,

 

Tom Christie |  Information Technology Manager  |  AGM Container Controls, Inc.  |   tchristie@...  | t: 520.881.2130 ext 2176