Page 1 of 1

TitleCompany Hidden Fields

Posted: Fri May 03, 2019 12:17 pm
by uwdoug79
I am trying to correct a logo problem occurring with the Titlecompany record. In order to get this to work I am being asked to set the values for LogoSize and LogoWidthHTML that exist on the company record. I am able to see the field come back to my object in the query of the company lookup code but the object that I have instantiated is complaining that there is no field in the object with that name:

Code: Select all

titlecompany.LogoImage = (Image)myRow["LogoImage"].Value;   // this works
titlecompany.LogoSize = Convert.ToString(myRow["LogoSize"]);  // this throws an error
titlecompany.LogoWidthHTML = Convert.ToString(myRow["LogoWidthHTML"]);  // this also throws an error
The exact error is "TitleCompany does not contain a definition for LogoSize"

I am assuming it is because the field is marked hidden in softpro. Is there a way to set the value on hidden fields?

Doug

Re: TitleCompany Hidden Fields

Posted: Fri May 03, 2019 1:23 pm
by uwdoug79
I may have answered my own question.

Code: Select all

                                        if (tccodes.HasProperty("LogoSize_FNF#") && tccodes.GetIsSupported("LogoSize_FNF#")) { tccodes["LogoSize_FNF#"] = Convert.ToString(myRow["LogoSize"]).Trim(); }
                                        if (tccodes.HasProperty("LogoWidthHTML_FNF#") && tccodes.GetIsSupported("LogoWidthHTML_FNF#")) { tccodes["LogoWidthHTML_FNF#"] = Convert.ToString(myRow["LogoWidthHTML"]).Trim(); }

I believe this will be the correct syntax.

The dev environment is timing out though so I can't test at this time.

Re: TitleCompany Hidden Fields

Posted: Fri May 03, 2019 1:55 pm
by BobRichards
You just have to make sure you use the same spelling for the Custom Fields as was used to create them - including the pound signs at the end.