Community
Showing results for 
Search instead for 
Do you mean 
Reply

What does CompanyList.Item take as Param and what does it return

Accepted Solution Solved
Copper Contributor
Posts: 16
Country: New Zealand
Accepted Solution

What does CompanyList.Item take as Param and what does it return

In the SDK it says the Item property of CompanyList accepts an index and return the company of that index, but how's that possible, since we only have GUIDs for Companies and Contacts and etc, not an integer.

Accepted Solutions
Solution
Accepted by topic author zhili
‎09-25-2015 03:20 AM
Bronze Elite Contributor
Posts: 2,115
Country: United_Kingdom

Re: What does CompanyList.Item take as Param and what does it return

Hiya,

 

The CompanyList object implements the IDataList interface and so is a Collection Object. In simple terms you can consider it to be a collection of Company objects (a very rough analogy could  be thinking of it as an Array of Company objects) so each object within the collection holds its own Index. When you call the [DefaultMemberAttribute] of the class you are actually asking the collection object to return the object at that particular index.

 

I hope that all makes some sense.

 

Vivek 

Vivek Gargav
Caldere Associates Ltd.
www.caldere.com
vgargav@caldere.com
My Blog

View solution in original post


All Replies
Solution
Accepted by topic author zhili
‎09-25-2015 03:20 AM
Bronze Elite Contributor
Posts: 2,115
Country: United_Kingdom

Re: What does CompanyList.Item take as Param and what does it return

Hiya,

 

The CompanyList object implements the IDataList interface and so is a Collection Object. In simple terms you can consider it to be a collection of Company objects (a very rough analogy could  be thinking of it as an Array of Company objects) so each object within the collection holds its own Index. When you call the [DefaultMemberAttribute] of the class you are actually asking the collection object to return the object at that particular index.

 

I hope that all makes some sense.

 

Vivek 

Vivek Gargav
Caldere Associates Ltd.
www.caldere.com
vgargav@caldere.com
My Blog