Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, April 16, 2024 
 
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!
 External Development Forums - General External Development
Forum to discuss general external development topic (related or not to SalesLogix development). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to General External Development | New ThreadView:  Search:  
 Author  Thread: How to use CreateActivity function?
Ruchi
Posts: 19
 
How to use CreateActivity function?Your last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
Alexander Pfingstl
Posts: 43
 
Re: How to use CreateActivity function?Your last visit to this thread was on 1/1/1970 12:00:00 AM
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!
[Reply][Quote]
Ruchi
Posts: 19
 
Re: How to use CreateActivity function?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Jun 08 4:14 AM
Thanks for your reply. Can u provide me some examples also??
[Reply][Quote]
Alexander Pfingstl
Posts: 43
 
Re: How to use CreateActivity function?Your last visit to this thread was on 1/1/1970 12:00:00 AM
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!!
[Reply][Quote]
Ruchi
Posts: 19
 
Re: How to use CreateActivity function?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Jun 08 4:38 AM
Thanks . It works for me.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: How to use CreateActivity function?Your last visit to this thread was on 1/1/1970 12:00:00 AM
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.
[Reply][Quote]
Ruchi
Posts: 19
 
Re: How to use CreateActivity function?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Jul 08 7:08 AM
Thanks for your help...

Ruchi
[Reply][Quote]
David Ogles
Posts: 51
 
Re: How to use CreateActivity function?Your last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: How to use CreateActivity function?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Dec 09 3:40 PM
Quote:
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
[Reply][Quote]
David Ogles
Posts: 51
 
Re: How to use CreateActivity function?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Dec 09 3:43 PM
That's what I was afraid of. Do you know of a quick way to return the ActivityID as that is being processed?

thanks,
dave
[Reply][Quote]
David Ogles
Posts: 51
 
Re: How to use CreateActivity function?Your last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: How to use CreateActivity function?Your last visit to this thread was on 1/1/1970 12:00:00 AM
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.
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: How to use CreateActivity function?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 May 12 1:06 PM
fiogf49gjkf0d

Quote:
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).


 


 

[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: How to use CreateActivity function?Your last visit to this thread was on 1/1/1970 12:00:00 AM
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.
[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 © 2024 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): 4/16/2024 2:23:41 PM