Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Thursday, June 19, 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: Activity Created by Script not Appearing in Outlook
John Steele
Posts: 12
 
Activity Created by Script not Appearing in OutlookYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Jun 07 3:23 PM
I have successfully created an activity via script by directly writing to the Activity and User_Activity tables. This work was based on http://www.slxdeveloper.com/forum.aspx?forumid=2000&postid=721#721

The new, script generated activity does appear in SalesLogix for the user. Unfortunately, unlike activities directly created by the user, the script generated activity does NOT appear in the user's outlook. Via script, how can I get the activity to appear in outlook?

Thanks!
John
[Reply][Quote]
Jeff Weight
Posts: 219
 
Re: Activity Created by Script not Appearing in OutlookYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Jun 07 9:19 AM
When I created Activities via a script, I wrote to a third table as well - the UserNotification table. I think that might be the last thing on your to-do list. However, in order to be sure, and to find out exactly what SalesLogix does when it is done by the user with the normal forms, pop the form up on yours or someone elses computer, open up the profiler (found in the C:\Program Files\SalesLogix folder on your computer), and see what the profiler says SalesLogix is doing as far as creating records in the database. You might have some settings on the three inserts as well that are important for synchronizing in Outlook. If that wasn't terribly clear, let me know and I'll be more specific about what to do with the profiler.
[Reply][Quote]
John Steele
Posts: 12
 
Re: Activity Created by Script not Appearing in OutlookYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 08 Jun 07 3:04 PM
Thanks Jeff. That profiler tool is pretty handy. Unfortunately, I'm still not getting outlook entries. Neither the popup based process or my process write to the UserNotification table. In looking at the profiler, the only difference I could see that looked significant is that the popup based process would perform at slx_SetGlobalID(current user ID) before and a slx_ClearGlobalID after each insert. I was not able to directly add these to my code, but this article ( http://www.slxdeveloper.com/page.aspx?id=35&articleid=44 ) indicates that they are optional.

Next I will try writing to the UserNotification table anyway to see what happens, but it will probably be late next week before I have time to try this.
[Reply][Quote]
Jeff Weight
Posts: 219
 
Re: Activity Created by Script not Appearing in OutlookYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 08 Jun 07 3:11 PM
Ok - I look forward to seeing what happens.
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Activity Created by Script not Appearing in OutlookYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Jun 07 8:59 AM
I've never touched the USERNOTIFICATION tables, just leave that up to SLX. But I do fill in a ton of fields in ACTIVITY. More than you think you need.

Store a Meeting Activity normally. In SQL Query Analyzer or SLX Profiler make a note of EVERY field stored. Then replicate that in your script. 5 Recurs fields, Alarm TF, all the DateTimes, USERID, et al.....

[Reply][Quote]
John Steele
Posts: 12
 
Re: Activity Created by Script not Appearing in OutlookYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Jun 07 9:44 AM
Well, I'm finally getting back to this research.

I always have been populating every field in the Acitivty and User_Activity tables. I did go through and double check the values. The only difference that I can find between records created by SLX and records created by my script is that the ForeignKey1 field was filled in. I tried coping one of the ForeignKey1 strings into my script and it had no effect. Does anyone know how to generate a proper ForeignKey1 in script?

Since this is just a test to prove that I can put a meeting in Outlook via script, my code is pretty simple. The form just consists of a single button. I’ve attached my script. Maybe somebody has time to look/test this script and can see where I’m going wrong. Thanks agian!

option explicit

Sub Button1Click(Sender)

dim objRS
dim ActID

ActID = Application.BasicFunctions.GetIDFor("Activity")
Set objRS = CreateObject("ADODB.Recordset")
Set objRS.ActiveConnection = Application.GetNewConnection
objRS.CursorLocation = adUseClient
objRS.CursorType = adOpenStatic
objRS.LockType = ADLockOptimistic

objRS.Open "SELECT * FROM Activity " & _
"Where 1 = 2"

objRS.AddNew

msgbox("Pre value assignments")
objRS.fields("ACTIVITYID").value = ActID
objRS.fields("TYPE").value = 262145
objRS.fields("ACCOUNTID").value = "A6UJ9A000SUY"
objRS.fields("CONTACTID").value = "C6UJ9A002VSR"
objRS.fields("OPPORTUNITYID").value = ""
objRS.fields("PROJECTID").value = NULL
objRS.fields("ACCOUNTNAME").value = "RETAIL WIZARD SAMPLE"
objRS.fields("CONTACTNAME").value = "Wise, Dick"
objRS.fields("OPPORTUNITYNAME").value = ""
objRS.fields("PHONENUMBER").value = "2607485536"
objRS.fields("PRIORITY").value = "High"
objRS.fields("CATEGORY").value = ""
objRS.fields("STARTDATE").Value = dateadd("d", 7, date)
objRS.fields("DURATION").value = 30
objRS.fields("DESCRIPTION").value = "This is an automatic meeting creation - 2!!!"
objRS.fields("ALARM").value = "F"
objRS.fields("ALARMTIME").value = dateadd("h", -1, objRS.fields("STARTDATE").Value)
objRS.fields("ACTIVITYBASEDON").value = ""
objRS.fields("PROCESSID").value = ""
objRS.fields("PROCESSNODE").value = ""
objRS.fields("RECURRING").value = "F"
objRS.fields("RECURITERATIONS").value = Null
objRS.fields("RECURPERIOD").value = Null
objRS.fields("RECURPERIODSPEC").value = Null
objRS.fields("RECURSKIP").value = Null
objRS.fields("TIMELESS").value = "T"
objRS.fields("ROLLOVER").value = "F"
objRS.fields("USERID").value = "U6UJ9A00007D"
objRS.fields("ORIGINALDATE").value = now
objRS.fields("CREATEDATE").value = now
objRS.fields("CREATEUSER").value = application.BasicFunctions.CurrentUserID
objRS.fields("MODIFYDATE").value = now
objRS.fields("MODIFYUSER").value = application.BasicFunctions.CurrentUserID
objRS.fields("NOTES").value = "This is a test of creating an activity via script"
objRS.fields("LONGNOTES").value = "This is a test of creating an activity via script"
objRS.fields("ATTACHMENT").value = Null
objRS.fields("FOREIGNID1").value = "040000008200E00074C5B7101A82E0080000000040A41ED6EAB3C701000000000000000010000000EF3FF334A028A240920698DBCF1D9B6D"
objRS.fields("FOREIGNID2").value = ""
objRS.fields("FOREIGNID3").value = ""
objRS.fields("FOREIGNID4").value = ""
objRS.fields("USERDEF1").value = Null
objRS.fields("USERDEF2").value = Null
objRS.fields("USERDEF3").value = Null
objRS.fields("TICKETID").value = ""
Msgbox("Post Value Assignments")

application.BasicFunctions.LogSetGlobalID "U6UJ9A00007D"
objRS.update

Msgbox("Post Update")
objRS.close

set objRS = Nothing

Set objRS = CreateObject("ADODB.Recordset")
Set objRS.ActiveConnection = Application.GetNewConnection
objRS.CursorLocation = adUseClient
objRS.CursorType = adOpenStatic
objRS.LockType = ADLockOptimistic

objRS.Open "SELECT * FROM User_Activity " & _
"Where 1 = 2"

objRS.AddNew

Msgbox("Pre User_Activity value assignments")
objRS.Fields("ACTIVITYID").value = ActID
objRS.fields("USERID").value = "U6UJ9A00007D"
objRS.fields("CONFIRMED").value = "T"
Msgbox("Pre User_Activity Update")
application.BasicFunctions.LogSetGlobalID "U6UJ9A00007D"

objRS.update
Msgbox("Post User_Activity Update")

objRS.close

set objRS = Nothing

End Sub
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Activity Created by Script not Appearing in OutlookYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Jun 07 10:02 AM
Although I've sent Emails through Outlook, Message Ques, or Domino objects before.... I haven't messed with Intellisync, nor worried about my activities showing up in outlook.

They just do.

Why is Timeless = 'T', shouldn't it be false to appear in the calendar?
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Activity Created by Script not Appearing in OutlookYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Jun 07 1:42 AM
I do believe that RJ has a good point here.

If Timeless = T, then it won't show up as a block of time in the Calendar, but rather as a Timeless activity (ussually shows on Day view on the Top section).

Also, have you configured your sync to include Meetings? If you Manually create Timeless meetings, what result do you see.

Also, what are you using to Sync between SLX and Outlook? Intellisync, Exchange Link?
[Reply][Quote]
Bob (RJ)Ledger
Posts: 1103
Top 10 forum poster: 1103 posts
 
Re: Activity Created by Script not Appearing in OutlookYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Jun 07 7:41 AM
Quote:
Originally posted by John Steele

Well, I'm finally getting back to this research.

I always have been populating every field in the Acitivty and User_Activity tables. I did go through and double check the values. The only difference that I can find between records created by SLX and records created by my script is that the ForeignKey1 field was filled in. I tried coping one of the ForeignKey1 strings into my script and it had no effect. Does anyone know how to generate a proper ForeignKey1 in script?

Since this is just a test to prove that I can put a meeting in Outlook via script, my code is pretty simple. The form just consists of a single button. I’ve attached my script. Maybe somebody has time to look/test this script and can see where I’m going wrong. Thanks agian!

option explicit

Sub Button1Click(Sender)
...
objRS.fields("FOREIGNID1").value = "040000008200E00074C5B7101A82E0080000000040A41ED6EAB3C701000000000000000010000000EF3FF334A028A240920698DBCF1D9B6D"


Why ar eyou messing w/Foreign ID? - "Foreign" is reserved and used by slx to "link" to outlook...
Get rid of the "Foreign" fields in your recordset.
--
rjl
[Reply][Quote]
John Steele
Posts: 12
 
Re: Activity Created by Script not Appearing in OutlookYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Jun 07 9:25 AM
Quote:
Originally posted by Raul A. Chavez

Also, have you configured your sync to include Meetings? If you Manually create Timeless meetings, what result do you see.

Also, what are you using to Sync between SLX and Outlook? Intellisync, Exchange Link?


If I manually create a Timeless Meeting, it immediately shows up in outlook at the top of the assigned day as an all day event. I changed my script so that it created a timed meeting. The results look fine in SLX (for both local and remote users), but does not show up in outlook.

I do not know what Sync is being used. I'll try to find out.

[Reply][Quote]
John Steele
Posts: 12
 
Re: Activity Created by Script not Appearing in OutlookYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Jun 07 9:35 AM
Quote:
Originally posted by Bob (RJ)Ledger



Why ar eyou messing w/Foreign ID? - "Foreign" is reserved and used by slx to "link" to outlook...
Get rid of the "Foreign" fields in your recordset.
--
rjl


I think you are on to something. The Foreign Id is the only difference I see between the manually created meetings and the script created meetings. I was messing with the Foreign Id to try to get a result, even if it was wrong, in Outlook. At this point, getting Outlook to have any reaction to my script would be progress.

As you suggested, I removed the foreign ids from my record set. The results were the same. Nothing appeared in outlook. On the database, the Foreign Id fields are all NULL. How do I get (trick) SLX into creating a Foreign Id via script?

Thanks,
John
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Activity Created by Script not Appearing in OutlookYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Jun 07 10:55 AM
Nothing appears in Outlook is the correct answer.

What transport mechanism are you using to create the activity in Outlook?

If you don't run your script can you create an activity in SLX manually and get it to appear in Outlook?

If you are using Intellisync...right version? set up for one way push on Activity TO outlook?
[Reply][Quote]
John Steele
Posts: 12
 
Re: Activity Created by Script not Appearing in OutlookYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Jun 07 9:44 AM
Okay, I’ve figured out what was going on and it’s a bit odd. Manually created meetings IMMEDIATELY appeared in Outlook without the sync process being triggered. Script created meetings did not show up in Outlook at all. That convinced me that it was an issue with my script. It wasn’t.

It turns out that I had no transport method specified for synchronization. This is our company’s default setting. Why were manually created meetings appearing in Outlook if no transport method was specified? I believe that this was because Outlook was specified as the calendar within SalesLogix. Now everything works and I can give my users the options they want.

Thanks to all for your input and patients.

John
[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): 6/19/2025 4:27:38 AM