The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
Posting History with userdefined fields
Posted: 13 Feb 07 12:43 PM
|
fiogf49gjkf0d Hi all, I've added a field MYPFID to the activity(System:Activity Details View) and history detail(System:History Details View).
When I add activities, it posts the MYPFID to the activity table just fine. When I complete an activity using F3, it DOES NOT post the MYPFID. I understand that it's being called by the App..BasicFunction.CreateCompletedActivityEx, the System:History Details posts fine from the Edit, but not when called from the F3 (System:Complete Typed Activity). I've checked the profiler and it's not passing the MYPFID.
Any ideas for a fix or workaround greatly appreciated. What good is it to add a UDF to the view if it won't post? My thanks in advance! |
|
|
|
Re: Posting History with userdefined fields
Posted: 14 Feb 07 4:24 AM
|
fiogf49gjkf0d Back in the dark ages prior to having this supported you could get away with slipping it into one of the other fields. ActivityBasedOn and ProcessNode are two of my favorites because they do not trigger any processing. You can also get away with processid, but that will search the process table on completion looking for a match.
If you want to keep your data looking clean, you can always just use this to pass things through and then have an "OnCompleted" type handler to move the data back where you want it.
I know this does not fix the problem, but then again we typically don't have time to wait for "official fixes", do we?
ws |
|
|
| |
|
Re: Posting History with userdefined fields
Posted: 26 Jun 07 2:17 PM
|
Completing an activity actually calls the System:History Detail view. These fields are bound to the history table not the activity table. Add this procedure, and call it from the AXFormShow event.
Sub PopulateCustomFields
'Complete Activity - Populate custom fields 'The HistoryID is not populated when first completing an activity. If Len(Activity.Key) >= 12 And Not(Len(frmHistoryDetails.CurrentID) >= 12) Then
Dim objSLXDB Dim rsAct Dim SQLTxt
Set objSLXDB = New SLX_DB Set rsAct = objSLXDB.GetNewRecordset
SQLTxt = "Select IsNull(Act1.CustomField, '') CustomField, " SQLTxt = SQLTxt & "From Activity Act1 " SQLTxt = SQLTxt & "Where Act1.ActivityID = '" & Activity.Key & "'" rsAct.Open SQLTxt, objSLXDB.Connection 'MsgBox "11: " & rsAct.RecordCount If Not rsAct.EOF Then txtCustomField.Text = rsAct.Fields("CustomField").Value & "" End If If rsAct.State = 1 Then rsAct.Close End If Set rsAct = Nothing Set objSLXDB = Nothing End If End Sub
|
|
|
|
Re: Posting History with userdefined fields
Posted: 09 Oct 12 11:08 AM
|
fiogf49gjkf0d this script works but if the field has type date and is null it inserts to history.customdatefield ='12/31/1899 7:00:00pm'
In sql string : select IsNull(OEV_Appl_Eff_Date,'') OEV_Appl_Eff_Date
How to fix this issue?
Thanks!!! |
|
|
|