When ther is no SA, BillCodes are missing

Discussions related to writing and managing custom business rules.

Moderator: Phil Barton

Post Reply
brianc_la
Posts: 15
Joined: Fri Oct 10, 2008 2:01 pm

When ther is no SA, BillCodes are missing

Post by brianc_la »

I have a business object that is trying to return true/ false if BillCodes exists with amounts. The problem is when there is no Settlement Agent, the HudLines.BillCode Collection returns lines but without BillCodes assigned. I see the Amounts. I can assign the payee to another type but still it is still an empty collection. Invoice Item billcoeds work fine.Perhaps there is a good reason for this.

Does the setup below look ok? What should I expect?

public bool ExecuteImpl(

//InputParameterHandle<IBusinessObject[]> payee, //1 Collection of Payees
InputParameterHandle<decimal[]> payeeamounts, //0 Amounts
InputParameterHandle<BillCode[]> billCodeid, //1 The BillCode on HudLine
InputParameterHandle<decimal[]> InvoiceLineAmounts, //2 Amounts
InputParameterHandle<BillCode[]> InvoiceLineBillCode //3 The BillCode on HudLine
)

<Instance>
<Name>RuleBCAmt</Name>
<BusinessRule>BusRuleBCAmt</BusinessRule>
<BusinessObjectContext>Order</BusinessObjectContext>
<Persist>False</Persist>
<HideFromUser>True</HideFromUser>
<InputList>
<Input>
<Order>0</Order>
<Source>RootContext\HUDs\HudLines\Payees\Amount</Source>
</Input>
<Input>
<Order>1</Order>
<Source>RootContext\HUDs\HudLines\Payees\BillCodeID</Source>
</Input>
<Input>
<Order>2</Order>
<Source>Invoice\InvoiceLine\Amount</Source>
</Input>
<Input>
<Order>3</Order>
<Source>Invoice\InvoiceLine\BillCode</Source>
</Input>
</InputList>
</Instance>
brianc_la
Posts: 15
Joined: Fri Oct 10, 2008 2:01 pm

Re: When ther is no SA, BillCodes are missing

Post by brianc_la »

Perhaps I need to check \HUDs\Hudline\BillCodeId & \Amount which I would guess would return all the BillCodes regardless of Payee assignment.

Is that the case?
Melissa Cook
Posts: 22
Joined: Tue Oct 28, 2008 11:11 am

Re: When ther is no SA, BillCodes are missing

Post by Melissa Cook »

Let me make sure I understand what you are trying to do. You are trying to return true or false if a billcode has an amount associated to it, correct? Is the billcode that you are trying to validate against on the HudLine or the Payee? Because we have a billcode on both the HudLine object and the Payee object.

Also, I see one thing. Since this rule is running on the Order context, you do not need to do "RootContex\HUDs\...". You just need to do "HUDs\....".
brianc_la
Posts: 15
Joined: Fri Oct 10, 2008 2:01 pm

Re: When ther is no SA, BillCodes are missing

Post by brianc_la »

Yes. I misunderstood that there were two billcodes. One on the hudline and one on the payee. So now I can use the hudline collection to find the billcodes regardless of thier assignment to a payee or not. Previously the deletion of the Order Contact was removing the billcodes on the payee\billcode collection.

Thanks
Melissa Cook
Posts: 22
Joined: Tue Oct 28, 2008 11:11 am

Re: When ther is no SA, BillCodes are missing

Post by Melissa Cook »

The billcode on the HudLine and the billcode on the payee are two different dataitems. If you are trying to get to the billcode and amount on the HudLine, then you need to use the HudLine collection. If you are trying to get to the billcode and amount on the Payee, then you need to use the Payee collection.

On another note, if you have a order contact in the payee grid that is system defaulted in, and you go and delete that order contact, then, yes, it will delete that payee from the payee grid, remove it from the collection, along with the billcode on the payee collection.

I hope this makes sense...please let me know if it does not.
Thanks.
Post Reply