Page 2 of 2

Re: Exception trying to set up a field value

Posted: Tue Apr 13, 2021 10:20 am
by BobRichards
I am curious about one comment you made you said earlier.
According to our Business side she can change it on the UI without any issues. One thing I have wondered. See, in my code I use a simple assignment, and in yours you use the SetProperty method.. any differences?
Are you both using the same system and username/password or different setups? The intent was to rule out any ways that your development setup and credentials might be different from those that have some permission enabled or other environmental difference.

Re: Exception trying to set up a field value

Posted: Thu Apr 15, 2021 1:36 pm
by merak.marey
Hi Bob

The process does not use the same username/password, but as stated before, same process does not fail in other orders.

The user for this process has admin rights.

Thanks

Re: Exception trying to set up a field value

Posted: Fri Apr 16, 2021 11:28 am
by BobRichards
I cannot replicate your error. I open the order and pass it and the SelectServer instances to my method. I have used your code as much as possible but it did not fail when setting the BuyerPaidAtClosing property.

Code: Select all

public AggregateAdjustment(SelectServer ss, IOrder order)
{
    // Get Escrow section lines.
    IList lines = ((IOrderItem)order.GetProperty<IList>("CDFs")[0])
        .GetProperty<IOrderItem>("EscrowSection")
        .GetProperty<IList>("Lines");

    // Find the 
    var AdjustmentOrderLine = (dynamic)((IEnumerable)lines).Cast<dynamic>()
        .Where(p => p.Description == "Aggregate Adjustment" || (dynamic)((IEnumerable)p.Charges).Cast<dynamic>()
        .Where(c => c.Description == "Aggregate Adjustment").ToList().Count() > 0).ToList().FirstOrDefault();

    if (AdjustmentOrderLine != null)
    {
        AdjustmentOrderLine.Charges.Clear();
        //if (EncompassObject.agregateAdjustment != 0)
        {
            AdjustmentOrderLine.Charges[0].BuyerPaidAtClosing = 666m; // HERE - 1422
            AdjustmentOrderLine.Charges[0].Payees[0].IsDeducted = false;
            AdjustmentOrderLine.Charges[0].Payors[0].ProcessAs = SoftPro.OrderTracking.Client.Orders.ProcessAs.ReduceFunds;
        }
    }
}
The code correctly finds the "Aggregate Adjustment" line G.08 and modifies the BorrowerPaidAtClosing and payee/payor properties.

Re: Exception trying to set up a field value

Posted: Tue Apr 20, 2021 1:06 pm
by merak.marey
Hi Bob

As mentioned before, the same code works perfectly for the big majority of the orders. But in some cases it does fails, rendering the BuyerPaidAtClosing property read-only.

We just need an explanation on why this may be happening so our Business can do the appropiate research.

Thanks

Re: Exception trying to set up a field value

Posted: Tue Apr 20, 2021 1:25 pm
by BobRichards
I do not have a reason. Production needs to furnish the criteria or example orders that have this failure mode. Then we can analyze the order for the root cause. Without any information at all, it is just likely that there was a networking error as any other error mechanism I could postulate. Sorry.