Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Sunday, February 23, 2025 
 
slxdeveloper.com Community Forums  
   
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!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Posting History with userdefined fields
Ron Buchanan
Posts: 72
 
Posting History with userdefined fieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
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!
[Reply][Quote]
Walter Shpuntoff
Posts: 167
 
Re: Posting History with userdefined fieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
Walter Shpuntoff
Posts: 167
 
Re: Posting History with userdefined fieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Feb 07 4:25 AM
fiogf49gjkf0d
Oops... one thing I forgot to ask/add here.....

I am assuming you are on v7?
What you are doing did not officially work until then.

ws
[Reply][Quote]
Lawrence Reid
Posts: 63
 
Re: Posting History with userdefined fieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
Galina
Posts: 22
 
Re: Posting History with userdefined fieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
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!!!

[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 2/23/2025 6:17:20 AM