Coming soon: Your brand new Help Center & Community! Get a sneak-peek here

Get List of Sale Types using web services

Hi there,

The ListAgent has the following two functions:

GetAllSaleType()

GetAllSaleTypeEntities(bool includeDeleted)

Neither of these functions appear to be implemented

So my question is how would I get a list of the Sale Types?

 

Cheers James

RE: Get List of Sale Types using web services

Hi,

I assume this is CRMScript, for me both these provide results

#setLanguageLevel 3;

NSListAgent agent;

NSSaleType[] saleType = agent.GetAllSaleType();
printLine("------\nSaleType\n------\n");
for(Integer i = 0; i < saleType.length();i++)
  printLine(saleType[i].GetValue());


NSSaleTypeEntity[] saleTypeEntity = agent.GetAllSaleTypeEntities(false);
printLine("\n------\nSaleTypeEntity\n------\n");
for(Integer j = 0; j < saleTypeEntity.length();j++)
  printLine(saleTypeEntity[j].GetName());
Von: Michel Krohn-Dale 2. Jan 2020

RE: Get List of Sale Types using web services

Hi Michael,

thanks for the reply it's not with the NSListAgent in CRM Script it is using the SuperOffice.CRM.Services.ListAgent

apart from the "NS" though my code would be exactly the same as yours

 

Thanks James

Von: James Carter 2. Jan 2020

RE: Get List of Sale Types using web services

Hi,

Really should not be any different as this is just exposed to CRMscript.

Same as calling thru REST API:  http://<hostname>/SuperOffice/api/v1/List/SaleType/Items?includeDeleted=False

Von: Michel Krohn-Dale 2. Jan 2020

RE: Get List of Sale Types using web services

Hello James,

What services version are you targeting? (the services<number> part of the RemoteBaseUrl), could be that the version that you are targeting doesn't have those methods. Latest stable version is services87.

Von: David Hollegien 2. Jan 2020

RE: Get List of Sale Types using web services

Hi Michael,

thanks for the reply it's not with the NSListAgent in CRM Script it is using the SuperOffice.CRM.Services.ListAgent

apart from the "NS" though my code would be exactly the same as yours

 

Thanks James

Von: James Carter 2. Jan 2020

RE: Get List of Sale Types using web services

Hi David,

you are correct I had copied over an old config file and it was pointing to services 80

 

Thanks for the assistance - I'll go through all old config files and update them!!!

 

Cheers James

Von: James Carter 2. Jan 2020