Community
Showing results for 
Search instead for 
Do you mean 
Reply

Document Link

Accepted Solution Solved
Copper Contributor
Posts: 41
Country: USA
Accepted Solution

Document Link

[ Edited ]

ACT has a new feature that will allow you to 'link' a folder to the documents tab. Can this be created with the API?

 

Bob Lozinak

Bob Lozinak
Twelve/Three Marketing, Inc.
Software Developer

Accepted Solutions
Solution
Accepted by sam_raikes (Copper Super Contributor)
‎09-25-2015 03:20 AM
Copper Super Contributor
Posts: 86
Country: United_Kingdom

Re: Document Link


boblozinak wrote:

ACT has a new feature that will allow you to 'link' a folder to the documents tab. Can this be created with the API?

 

Bob Lozinak


 

Hi Bob,

 

Yes, this can be done via the SDK.

 

It looks something like this (C#):

 

HistoryType MyLibraryDocument = actApp.ActFramework.Histories.GetHistoryType("Library Document");

Act.Framework.Contacts.Contact MyRecord = actApp.ActFramework.Contacts.GetMyRecord();
Act.Framework.Histories.History MyHistory = actApp.ActFramework.Histories.CreateHistory();

MyHistory.ContactList = actApp.ActFramework.Contacts.GetContactAsContactList(actApp.ApplicationState.CurrentContact);
MyHistory.CreateUserID = MyRecord.ID;
MyHistory.HistoryType = MyLibraryDocument;
MyHistory.Regarding = "C:\Users\sam.raikes\Documents\";
MyHistory.Details = "C:\Users\sam.raikes\Documents\";
MyHistory.StartTime = DateTime.Now;
MyHistory.EndTime = DateTime.Now;
MyHistory.ManageUserID = MyRecord.ID;

MyHistory.Update();

 

The same code can be used to add a URL, but you would replace the Regarding with a description and the Details with a URL.

 

I hope this helps.

 

Sam.

____________________________________________________________

Unfortunately I no longer work for Swiftpage International. Please do not send any queries to this account.

View solution in original post


All Replies
Solution
Accepted by sam_raikes (Copper Super Contributor)
‎09-25-2015 03:20 AM
Copper Super Contributor
Posts: 86
Country: United_Kingdom

Re: Document Link


boblozinak wrote:

ACT has a new feature that will allow you to 'link' a folder to the documents tab. Can this be created with the API?

 

Bob Lozinak


 

Hi Bob,

 

Yes, this can be done via the SDK.

 

It looks something like this (C#):

 

HistoryType MyLibraryDocument = actApp.ActFramework.Histories.GetHistoryType("Library Document");

Act.Framework.Contacts.Contact MyRecord = actApp.ActFramework.Contacts.GetMyRecord();
Act.Framework.Histories.History MyHistory = actApp.ActFramework.Histories.CreateHistory();

MyHistory.ContactList = actApp.ActFramework.Contacts.GetContactAsContactList(actApp.ApplicationState.CurrentContact);
MyHistory.CreateUserID = MyRecord.ID;
MyHistory.HistoryType = MyLibraryDocument;
MyHistory.Regarding = "C:\Users\sam.raikes\Documents\";
MyHistory.Details = "C:\Users\sam.raikes\Documents\";
MyHistory.StartTime = DateTime.Now;
MyHistory.EndTime = DateTime.Now;
MyHistory.ManageUserID = MyRecord.ID;

MyHistory.Update();

 

The same code can be used to add a URL, but you would replace the Regarding with a description and the Details with a URL.

 

I hope this helps.

 

Sam.

____________________________________________________________

Unfortunately I no longer work for Swiftpage International. Please do not send any queries to this account.