Community
Showing results for 
Search instead for 
Do you mean 
Reply

History Phone Activity Time is always 12

New Member
Posts: 5
Country: United_Kingdom

History Phone Activity Time is always 12

[ Edited ]

Hi,

 

We are seeing wiered behavior when History activity time is always 12 whereas date is correct. We are using ClearActivity function of SDK to generate history records in a call flow.

 

This is happening for existing users, when we create a new user and runs callflow it generates History activity with correct date and time.

 

Version of software is Act Premium 2013.

 

Any help would be highly appreciated.

 

Regards

Copper Super Contributor
Posts: 52
Country: United_Kingdom

Re: History Phone Activity Time is alwasy 12

Hi Synety,

 

Can you please provide a code sample showing your use of ClearActivity so I can assist you?

 

Kind regards,

 

 

Russell

New Member
Posts: 5
Country: United_Kingdom

Re: History Phone Activity Time is alwasy 12

void Activities_CreateActivityComplete(IActivity activity) {
if (CloudCall.IsCloudCallActivity) {
try {
CloudCall.IsCloudCallActivity = false;
Activity aActivity;
Guid[] ActivityIDs = new Guid[1];
ActivityIDs[0] = activity.ActivityId;

// get your Activity or ActivityList
ActivityList alActivityList = actApplication.ActFramework.Activities.GetActivityInstancesByActivityId(ActivityIDs);
aActivity = alActivityList[0];

string ClearResult = CloudCall.HistoryType;

if (!CloudCall.IsOutboundCall)
ClearResult = "Incoming Call Completed";

Act.Framework.Histories.HistoryType ht = actApplication.ActFramework.Histories.GetHistoryType(ClearResult);

CalendarDelegateGrantor cdg = actApplication.ActFramework.CalendarDelegates.GetCalendarDelegateGrantorByAccessorId(aActivity.AccessorId);

// check activity exists
if (aActivity != null) {
// clear the activity
actApplication.ActFramework.Activities.ClearActivity(aActivity, cdg, ht, false, aActivity.StartTime, aActivity.EndTime, aActivity.Details);
}
} catch (Exception ex) {
CloudCall.IsCloudCallActivity = false;
}
}
}

Copper Super Contributor
Posts: 52
Country: United_Kingdom

Re: History Phone Activity Time is alwasy 12

Hi Synety,

 

I've tried to replicate the issue you detailed in your post with ClearActivity but I am unable to do so.

 

I wrote a similar method and tested with standard and custom HistoryTypes and didn't see the problem.

 

ActivityList list = oActFwk.Activities.GetActivities(CurrentContact.ID);
                foreach (Activity a in list)
                {
                    if (a.IsCleared == false)
                    {
                        HistoryType type = oActFwk.Histories.GetHistoryType("Mailing Sent");
                        DateTime dt = DateTime.Now;
                        CalendarDelegateGrantor grantor = oActFwk.CalendarDelegates.GetCalendarDelegateGrantorByAccessorId(a.AccessorId);

                        oActFwk.Activities.ClearActivity(a, grantor, type, false, dt, dt, "Closed by testing app");
                    }
                }

 

The only main difference I can see is that I'm passing DateTime.now to the ClearActivity method. Can you check to see that the variables aActivity.StartTime, aActivity.EndTime don't actually have a time of 12?

 

Kind regards,

 

 

Russell

New Member
Posts: 5
Country: United_Kingdom

Re: History Phone Activity Time is alwasy 12

Thanks for your update. I will check mentioned variable and will get back to you in this regard.

 

Thanks again

New Member
Posts: 5
Country: United_Kingdom

Re: History Phone Activity Time is alwasy 12

Hi

 

Sorry for my late response, we have checked that start time and end time are correct and history activity is generated with valid times.

 

Secondly we are also not able to produce this same error in our testing environment, however on customer environment it is happing for existing users. But when new user is created on customer environment history record is generated correctly through clearactivity same method.

 

Please let me know if further details are required, or access to customer environment can also be arranged in this regard if that helps!

 

Many thanks.

Copper Super Contributor
Posts: 52
Country: United_Kingdom

Re: History Phone Activity Time is alwasy 12

[ Edited ]

Hi Synety,

 

Since we've seen this working in both your environment and mine, I'm not entirely sure the problem is related to the SDK method.

 

When you said that it's happening in the customer environment do you mean that it happens in any database in their environment or just their live database?

 

If it's specific to the database it could be a data problem.

 

Kind regards,

 

 

Russell

New Member
Posts: 5
Country: United_Kingdom

Re: History Phone Activity Time is alwasy 12

Hi,

 

Thanks for your prompt response. It's currently reported for their live database

 

It  issue on customer database but with particular user logins only. If we consider this as might be case do we have any utlity to check and fix database records and relevant objects.

 

If there is a utility, we will then request customer to run those and see results if there are any impacts.

 

Regards

Copper Super Contributor
Posts: 52
Country: United_Kingdom

Re: History Phone Activity Time is alwasy 12

Hi,

 

Please backup the database and run all available repairs in the actdiag utility.

 

ACT! Database Rebuild and Repair Procedures

http://kb.swiftpage.com/app/answers/detail/a_id/19642/ 

 

Kind regards,

 

 

Russell

New Member
Posts: 1
Country: United_Kingdom

Re: History Phone Activity Time is alwasy 12

I have the same issue. I have run all the repairs and this has made no difference. I have found adding users after installing the add there is no issue, only have issues with existing users.