08-23-2010 10:09 AM
I'm using the SDataCSharpClientLib (SageScottsdalePlatform) C# client library to access SData.
I discovered something somewhat weird with the SDataSchema object.. For a Saleslogix schema object, it returns the field size as only half of what it actually is.
So if a property “AccountName” has a database length of 128, the SMEProperty.AverageLength property only returns 64.
Should I be looking at a different property to retrieve field length?
Solved! Go to Solution.
08-24-2010 06:23 AM
From section 4.7 of the SData spec, the AverageLength property "is a hint for the user interface. A service consumer can use it to set the visible size of edit fields in a form". In the SLX implementation this is populated with half the maximum possible length.
To get the true maximum length of a string property, you'll need to cast the SMEProperty instance into an SMEStringProperty which has a MaximumLength property.