BO.GetFieldDescription improvement


Author
Message
Fabian R Silva, -
Fabian R Silva, -
Advanced StrataFrame User (927 reputation)Advanced StrataFrame User (927 reputation)Advanced StrataFrame User (927 reputation)Advanced StrataFrame User (927 reputation)Advanced StrataFrame User (927 reputation)Advanced StrataFrame User (927 reputation)Advanced StrataFrame User (927 reputation)Advanced StrataFrame User (927 reputation)Advanced StrataFrame User (927 reputation)
Group: StrataFrame Users
Posts: 153, Visits: 1.2K
Is nice to see that the newer versions have improvements on DDT/MS_DESCRIPTION, some time ago I post a question about it on http://forum.strataframe.net/Topic10737-13-1.aspx and Ben say that DDT not support it yet.

These days, I try to get the MS_description to set column headers descriptions automatically from it and some sort of this stuff. I see that the DDT imports it, the BOMapper Map it to an "Description" attribute of the property of the field. Now I Try to get it with the "GetFieldDescription" method of the businessobjects



I see the help (2 hours later that I was implement it :w00tSmile to see that it exist, this say:



GetFieldDescription Method (FieldName)

--------------------------------------

Returns the extended description for a field name (i.e. Customer's Last Name) from the description attribute on the field property. If the Description() attribute is missing, the actual field name will be returned.



I see that all the properties that map fields from BO have a Description attribute, but when MS_Description doesn't have a value, this value are "" (Empty), and when I call MyBO.GetDescription I get a empty value (and not the one from the MyBo.somefieldname)



I "fix" that with this code:

MyDescription = _MyBO.GetFieldDescription("MyField") '<-- it retrieve a empty value

If String.IsNullOrEmpty(MyDescription) Then

MyDescription = _MyBO.GetPropertyDescriptor("MyField").DisplayName

End If



It worked Ok, but I suppose that it is good that if GetFieldDescription detect a empty description atttibute, it retrieve the "somefielname" property string Smile



Thanks for the great support Smile



Fabian.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search