AyaNova service management & work order software
AyaNova Support Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Acessing client WiKi embedded files Expand / Collapse
Author
Message
Posted 11/24/2009 8:40:48 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 11/30/2009 6:58:00 AM
Posts: 8, Visits: 55
How do I get the WiKi page Guid for a particular client and then how do I access the embedded files within a WiKi page?

I’m working on a stand alone application. I’m trying to access an embedded file associated with a client’s WiKi page.

I’ve used the AyaNova C# API example as a starting point.

I’ve only done simple coding to this point, just to become familiar with the different classes in the API.

I’ve been able to create a list of all available clients using the ClientPickList class. From this list I use the client Guid ID number to access a specific client using the Client class.

I’m not able to use the Client Guid ID number to access its WiKi page and I don’t see a WiKiPickList class like I use to access my client.

How do I get the WiKi page Guid for a particular client and then how do I access the embedded files within a WiKi page?

Any help is appreciated.
Post #4902
Posted 11/24/2009 9:41:59 AM
AyaNova Development & Support

AyaNova Development & SupportAyaNova Development & SupportAyaNova Development & SupportAyaNova Development & SupportAyaNova Development & SupportAyaNova Development & SupportAyaNova Development & SupportAyaNova Development & Support

Group: Administrators
Last Login: 2/11/2010 12:27:00 PM
Posts: 140, Visits: 493
GLENN_OVIS (11/24/2009)
How do I get the WiKi page Guid for a particular client and then how do I access the embedded files within a WiKi page?

I’m working on a stand alone application. I’m trying to access an embedded file associated with a client’s WiKi page.

I’ve used the AyaNova C# API example as a starting point.

I’ve only done simple coding to this point, just to become familiar with the different classes in the API.

I’ve been able to create a list of all available clients using the ClientPickList class. From this list I use the client Guid ID number to access a specific client using the Client class.

I’m not able to use the Client Guid ID number to access its WiKi page and I don’t see a WiKiPickList class like I use to access my client.

How do I get the WiKi page Guid for a particular client and then how do I access the embedded files within a WiKi page?

Any help is appreciated.



Hi Glenn to get a wiki page for a client use this:
WikiPage wp=WikiPage.GetItem(RootObjectTypes.Client, ClientGuid);//Where clientguid is the client id in question

To get a list of files use the AyaFileList object:
AyaFileList fl = AyaFileList.GetList(wp.ID);//where wp is the wikipage id

Cheers!

- John
Post #4903
Posted 11/24/2009 9:56:30 AM
AyaNova Development & Support

AyaNova Development & SupportAyaNova Development & SupportAyaNova Development & SupportAyaNova Development & SupportAyaNova Development & SupportAyaNova Development & SupportAyaNova Development & SupportAyaNova Development & Support

Group: Administrators
Last Login: 2/11/2010 12:27:00 PM
Posts: 140, Visits: 493
Whups, sorry Glenn, didn't realize it uses a type and id object so this is the correct form:
WikiPage wp = WikiPage.GetItem(new TypeAndID(RootObjectTypes.Client, ClientID));

Also the content is available as RTF, plain text or html. (it's natively stored in RTF)

See the reference for WikiPage class in the api docs: http://api.ayanova.com/
Post #4904
Posted 11/24/2009 10:58:44 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 11/30/2009 6:58:00 AM
Posts: 8, Visits: 55
John

The Class "WiKi", method "GetItem" is looking for one argument of type "TypeAndID". ie GetItem(TypeAndID) or GetItem(Guid for WiKi)

The line WikiPage wp=WikiPage.GetItem(RootObjectTypes.Client, ClientGuid); give an error of "There are No overload for method, 'GetItem' that takes 2 arguments".

Have I missed something?

Glenn
Post #4905
Posted 11/24/2009 11:09:15 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 11/30/2009 6:58:00 AM
Posts: 8, Visits: 55
John

I missed you corrected post. Everything working fine now.

Thanks

Glenn
Post #4906
Posted 11/24/2009 1:45:11 PM
AyaNova Development & Support

AyaNova Development & SupportAyaNova Development & SupportAyaNova Development & SupportAyaNova Development & SupportAyaNova Development & SupportAyaNova Development & SupportAyaNova Development & SupportAyaNova Development & Support

Group: Administrators
Last Login: 2/11/2010 12:27:00 PM
Posts: 140, Visits: 493
Good to hear, sorry about that I was going off the top of my head, forgot to check the api docs.
Cheers!
Post #4911
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 1 (1 guest, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: AyaNova Sales & Support, John

Permissions Expand / Collapse

All times are GMT -8:00, Time now is 9:25pm

Powered by InstantForum.NET v4.1.4 © 2010
Execution: 0.031. 9 queries. Compression Disabled.