HUD section 700 Commission Amount

Discussions related to SoftPro Select user interface development.

Moderator: Phil Barton

Post Reply
bandorganman
Posts: 63
Joined: Tue Mar 03, 2020 5:23 pm

HUD section 700 Commission Amount

Post by bandorganman »

Code: Select all

 if (hb2.Hud701 > 0)
                        {
                            IOrderItem line701 = (IOrderItem)lines[701];
                            IList chgs = (IList)line701.GetProperty("Charges");
                            IOrderItem chg = (IOrderItem)chgs[0];
                            chg.SetProperty("CommissionAmount", hb2.Hud701); // This line produces the error shown below
                            chg.SetProperty("HUDToName", hb2.Hud701A);
                        }
System.MissingMemberException: Member 'HUD701Charge.CommissionAmount' not found.
at SoftPro.EntityModel.Entity`1.GetField(String propertyName, Boolean nonPublic)
at SoftPro.EntityModel.Entity`1.OnSetValue(String propertyName, Object value)
at SoftPro.EntityModel.Entity`1.SoftPro.EntityModel.IEntity.SetProperty(String path, Object value)
at HUDCharge.SoftPro.OrderTracking.Client.Orders.IOrderItem.SetProperty(String , Object )
at SoftProConversion.Form1.CreateOrder() in C:\dev\SoftProConversion\SoftProConversion\Form1.cs:line 4934

I also tried "Amount' which did not work either. How do I enter the Listing Broker Commission and the Selling Broker Commission amounts on lines 701 and 702 of the HUD? The Field Code Browser shows Charges.CommissionAmount.
BobRichards
Posts: 1149
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: HUD section 700 Commission Amount

Post by BobRichards »

Sorry to take forever to respond. I had issues this week.

Unfortunately, the Field Code Browser does not determine the correct location of this property. This is one of those properties you have to use Visual Studio to place a break point in your code and manually inspect the order objects. It is actually part of the 701 (and 702) line object. Below I am using your code to get the line then setting the commission amount.

Code: Select all

IOrderItem line701 = (IOrderItem)lines[701];
line701.SetProperty("CommissionAmount", 777m);  // Amount $777.00
Also on the lines 701/702 are properties "AdjustDescription" and "CommissionPercent".
Bob Richards, Senior Software Developer, SoftPro
bandorganman
Posts: 63
Joined: Tue Mar 03, 2020 5:23 pm

Re: HUD section 700 Commission Amount

Post by bandorganman »

I hope the issues have been resolved satisfactorily and that all is well.

I did set a breakpoint and looked at the charge object and saw the amount property but could not set it. I should have looked at the line object but didn't because the field code browser was pointing to charges. Thank you for clearing this up. Stay well!
Post Reply