Skip to main content
replaced http://salesforce.stackexchange.com/ with https://salesforce.stackexchange.com/
Source Link

I need to identify licenses that have remaining licenses. Referring to UserLicense object, I need to write a query to retrieve license that returns where (TotalLicenses - UsedLicenses) > 0.

I am using .Net client and Api version 34. Following query works for get all license, (Working)

var licenseQry = await client.QueryAsync<Object>("SELECT Id,Name FROM UserLicense"); 

But (Not working)

var licenseQry = await client.QueryAsync<Object>("SELECT Id,Name,TotalLicenses FROM UserLicense") 

does not work. Throws an error sating invalid column.

Am I missing something?

This question is a follow up question from this questionthis question.

I need to identify licenses that have remaining licenses. Referring to UserLicense object, I need to write a query to retrieve license that returns where (TotalLicenses - UsedLicenses) > 0.

I am using .Net client and Api version 34. Following query works for get all license, (Working)

var licenseQry = await client.QueryAsync<Object>("SELECT Id,Name FROM UserLicense"); 

But (Not working)

var licenseQry = await client.QueryAsync<Object>("SELECT Id,Name,TotalLicenses FROM UserLicense") 

does not work. Throws an error sating invalid column.

Am I missing something?

This question is a follow up question from this question.

I need to identify licenses that have remaining licenses. Referring to UserLicense object, I need to write a query to retrieve license that returns where (TotalLicenses - UsedLicenses) > 0.

I am using .Net client and Api version 34. Following query works for get all license, (Working)

var licenseQry = await client.QueryAsync<Object>("SELECT Id,Name FROM UserLicense"); 

But (Not working)

var licenseQry = await client.QueryAsync<Object>("SELECT Id,Name,TotalLicenses FROM UserLicense") 

does not work. Throws an error sating invalid column.

Am I missing something?

This question is a follow up question from this question.

Source Link
Dhanuka777
  • 165
  • 1
  • 5

How to query userlicences that have remaining licenses

I need to identify licenses that have remaining licenses. Referring to UserLicense object, I need to write a query to retrieve license that returns where (TotalLicenses - UsedLicenses) > 0.

I am using .Net client and Api version 34. Following query works for get all license, (Working)

var licenseQry = await client.QueryAsync<Object>("SELECT Id,Name FROM UserLicense"); 

But (Not working)

var licenseQry = await client.QueryAsync<Object>("SELECT Id,Name,TotalLicenses FROM UserLicense") 

does not work. Throws an error sating invalid column.

Am I missing something?

This question is a follow up question from this question.