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!
|
|
How to use CreateActivity function?
Posted: 29 Jun 08 12:12 PM
|
Hi, how to use SlxApplication.BasicFunctionsCreateActivity() function? I am using this function by passing the activity type as string and contact id. but activity is not being created. and it returns null value.
Thanks Ruchi |
|
|
|
Re: How to use CreateActivity function?
Posted: 30 Jun 08 4:12 AM
|
Hi, You have to create an object like set objactivity = application.basicfunctions.createActivity(type, contactID) Then you have to fill in some properties like category, description... At last do a objactivity.save
If you want to have an example look at the activity detail view. The activity type which you pass into this function is not the type saved in the db. You find all information in the view and the activity support script. Hope this helps. If not, let me know, I have an example somwhere . Thanks! |
|
|
| |
|
Re: How to use CreateActivity function?
Posted: 30 Jun 08 4:23 AM
|
OK, I assume you are on SLX 7.x. I also assume you want to schedule an activity. Here is the code. I am NOT using CreateActivity. See below: set objActivity = Application.Activities.Add(atToDo,lueUser.LookupID) objActivity.AccountName = strAccount objActivity.AccountID = strAccountID objActivity.UserID = lueUser.LookupID objActivity.Contactid = StrContactID objActivity.ContactName = strContact objActivity.Category = "Your Category" objActivity.Title = "Your title" objActivity.StartTime = dateadd("m",-cmbMonth.Text,strExpDate) objActivity.Timeless = True objActivity.Save
Hope this helps!! |
|
|
| |
|
Re: How to use CreateActivity function?
Posted: 30 Jun 08 11:37 AM
|
Just to clarify, there is a difference between the two methods described in this thread.
1) Application.BasicFunctions.CreateActivity This is provided for you to invoke the dialog to create a new activity. You can pass to it a limited number of params to pre-fill some items in the dialog. It will return a string, which will be the ACTIVITYID of the new activity, if the user clicked ok, or a blank string if the user clicked cancel.
2) Application.Activities.Add This is used to programatically add an activity without user intervention. You use this to create an activity object, set it's properties then save it. The user never sees anything on the screen.
Just wanted to point that out. |
|
|
| |
|
Re: How to use CreateActivity function?
Posted: 03 Dec 09 3:22 PM
|
On the Application.Activities.Add function, is the list there the only items that you can auto populate? We have some other items such as Project and task that we would like to auto populate, is that possible?
thanks, dave |
|
|
|
Re: How to use CreateActivity function?
Posted: 03 Dec 09 3:40 PM
|
Originally posted by David Ogles
On the Application.Activities.Add function, is the list there the only items that you can auto populate? We have some other items such as Project and task that we would like to auto populate, is that possible?
thanks, dave |
|
I believe so, unless something has changed (I know you couldn't the last time I did anything with the LAN client - which was quite a while ago ). AFAIK, you'd have to get the activity ID and then update those other fields via SQL.
-Ryan |
|
|
| |
|
Re: How to use CreateActivity function?
Posted: 03 Dec 09 5:25 PM
|
Ran into another problem. For some reason, it seems that you can pull anything back from the Activity table. the SQL is correct, but just errors out. Is is somehow locked?
thanks |
|
|
|
Re: How to use CreateActivity function?
Posted: 04 Dec 09 12:45 AM
|
I haven't seen any issues with SQL statements against the Activity table. If you are still having issues, go ahead and share your query. |
|
|
|
Re: How to use CreateActivity function?
Posted: 01 May 12 1:06 PM
|
fiogf49gjkf0d Originally posted by David Ogles
On the Application.Activities.Add function, is the list there the only items that you can auto populate? We have some other items such as Project and task that we would like to auto populate, is that possible? thanks, dave |
|
In the LAN Architect.....
Manage Plugins for Global Scripts
Open up the Activity Global Script
In one of the routines, type in Actvitity. and Intellisense will show you all of the available properties.
e.g. PhoneNumber isn't there......
So after your .Save, simply do some Update SQL based on the ActivityID (which is objActivity.Key !!).
We'll see when 8.0 comes out if they've added any more properties to the list (like the new field Location).
|
|
|
|
Re: How to use CreateActivity function?
Posted: 02 May 12 6:13 AM
|
fiogf49gjkf0d Actually this is a confirmed BAD FAD bug......SLX Activities object, vbScripts, Application.BasicFunctions, and sData Business Rules on the web don't set ALL non referenced\non populated fields to Null..... Brand New Activities created in 7.5.4 with NO recurring, no Rollovers, no Reminders, TIMELESS with no alarm set all have strange Activity Reminder times! Here's the Error! When you do a: Set objActivity = Application.Activities.Add(atToDo,Application.BasicFunctions.CurrentUserID) objActivity.Save SalesLogix does NOT set non-referenced fields to NULL! Now we know one reason why blank ContactID's, OpportunityID's, etc. appear in the Activity and History tables....instead of NULL! The Reminder Time should be set to the Scheduled Time. It's not, that's a BUG. |
|
|
|