we have a custom business process we are working on and would be awesome if we could create a custom
Msg###Sub Derived Field
and Error Type to display that msg### Field
in PayablesInvoiceError.
is this possible ?
Can you provide some more context on what you're trying to accomplish? Are you wanting to put an invoice in an error state as part of your custom process? You can invoke the creation of PayablesInvoiceError record, but you would need to set the PayablesInvoiceErrorType, and that field type has 75 state values. If there aren't PayablesInvoiceErrorType state values that match the errors you want to set, then you may need to take an alternative approach. You may want to also be careful putting invoices in error states as it might lead to unexpected behavior by delivered functionality. Instead of putting the invoice in an error state you could also put the invoice on hold with a comment.
Were doing some sort of Initiative with Bond Issuance.
Where we have to check to see if the process level of an invoice being entered that is for a project that it matches the process level attached to the distribution line project field.
Step 1 : add a persistent field "FHPaymentProcLvl" to Project Business class that would be used as a indicator of a "Process Level" to be associated with it (done)
Step 2: Configure the CreateChildWithin Form in Project to show the "FHPaymentProvLvl" field above and make it required (Done)
Step 3: Configure the MainProjectForm in Project to show the field above (Done)
Step 4: Create Relation between PayablesInvoiceDistribution and Project
Step 5: Create another Relation between PayablesInvoiceDistribution and Project
Step 6: Condition to check if the distribution has a project
Step 7: Another Condition in PayablesInvoiceDistribution to compare ProcessLevel vs the "process level" in project
Step 8: When invoice being entered…..check to see if it's related to a project and if the process level on the invoice header = the process level attached to the distribution line project.
if so…continue on.
if the process level on the invoice is not equal to the process level attached to the distribution project
set the Hold Code to be = BOND (and possibly add a comment to it also)
the hope would be then it put the invoice on hold…..so that no further processing could be done with it
until someone goes in fixes the issue of the process level on the invoice not being equal to the process level attached to the distribution line project.
does that seem feasible? once you put it on any sort of hold code…..it won't get further processed until taken off of hold.
Putting the invoice on hold will prevent it from being selected for payment. You may want to consider the performance impact of adding those User Fields, Relations and Action Configuration. Persistent User Fields are stored differently in the database than delivered fields, so filtering against them can often cause full table scans and the Invoice / Distribution business classes are usually large tables. Is there not an existing Finance Dimension you can compare Process Level to instead of adding a User Field to the Project dimension? You also probably don't need to create those Project relations; you can just refer to the Project explicitly.
if (PayablesInvoiceDistributionRel.DistributionAccount.Project entered and PayablesInvoiceDistributionRel.DistributionAccount.Project.FHPaymentProcLvl != ProcessLevel)
You may also want to be careful with which PayablesInvoiceDistribution relation you use since PayablesInvoiceDistributionRel is all invoice distributions, including accruals you don't necessarily see on the Payables Invoice form. Also that relation is one to many so you may run into issues if an invoice has multiple distributions with different Project values.