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!
|
|
Complete Activities via script?
Posted: 07 May 10 1:40 PM
|
We have a list of activities. The list is imported to an unassociated table (import history). We are capturing ActivityID and a date/timestamp. Can we complete the activities in the list via a script? (bypass the complete activity form) using the timestamp from the table for complete date (rather than "As Scheduled or Now) SLX 7.2
thanks!
J.
|
|
|
|
Re: Complete Activities via script?
Posted: 07 May 10 2:50 PM
|
Completing an Activity typically means Creating a matching record on the History table and deleting the Original Activity (if it is a recurring Activity, then you have more things to keep in mind, and may not be able to perform via scripting).
The history table has a matching field for every field on the Activity table, and additionally it has field for Result. You can create a script that copies the Activity records into History, and then deletes the Activity, thus marking it as Completed. While creating the History record, don't forget to set the Completed Date, Completed User and Result fields. |
|
|
|
Re: Complete Activities via script?
Posted: 07 May 10 4:04 PM
|
Thanks Raul,
We were hoping there was a function we could call (isn't SLX calling a function via the Complete Activity form?) but if we are just doing an insert and delete, it's not too bad. These are not recurring activities, so it shouldn't be a big deal.
Have a great weekend! j |
|
|
|
Re: Complete Activities via script?
Posted: 07 May 10 4:17 PM
|
Jill,
I don't have access to my Developers Guide at the moment, but I know there is a section on Application.Activities. Take a look at that and see if there is a way to complete activities by script without manually doing all the stuff Raul referred to.
Dan |
|
|
| |
|