Methods Directive not completing in correct order

,

i tried adding Erp.Contract.BO.Part to directive, but i get the following error:

There is at least one compilation error.
CreateOrder.CommonTypes.cs(346,33): error CS0433: The type ‘PartSubsTable’ exists in both ‘Erp.Contracts.BO.Part, Version=10.2.300.0, Culture=neutral, PublicKeyToken=5d3fa3c7105d7992’ and ‘Erp.Contracts.BO.Quote, Version=10.2.300.0, Culture=neutral, PublicKeyToken=5d3fa3c7105d7992’

I wish there was a more viable solution for these. Can you use a CallContext and a Data Directive with Code and a BO?

Unfortunately if I set a CallContext in Method Directive, the Data Directive does not see it or find it.

Really?!? That’s a surprise. I guess I don’t recall if I’ve used that before.
Can you use a Data Directive on OrderDtl when a new record is added with a QuoteNum?

i just tried it again and the QuoteDtl Standard Directive did pick up on the CallContext.

Perfect. That should work then.

1 Like

But the Standard Directive did not start when call the Create Order. Only when changed Quote Detail.

nope. I need the Data Directive called or started when CreateOrder is launched.

The orderdtl Standard Directive found the callContext record and I was able to add the Erp.Contracts.BO.Part to the References section. But the standard does not have the option for “Invoke BO Method”.

Explore DeferredUpdate there is reference to the method here InvTransferSvcContract.CommitTransfer fails when transferring the same part one after the other - #24 by josephmoeller

When I add that code in I get an error: "The type or namespace name ‘Internal’ does not exist in the namespace ‘Erp’ (Are you missing an assembly reference?)

Well right you will have to pull in the assembly for internal deferred update, but there are several methods in there i’m not sure if one or any of them is applicable I would poke around using DeferredUpdate as your search query and see what you can garner first

I brought into the References, the Erp.Internal.Lib.DeferredUpdate and I still get the error message.

I get the error message about the ttPartSubs error

get this error again:
There is at least one compilation error.
CreateOrder.CommonTypes.cs(346,33): error CS0433: The type ‘PartSubsTable’ exists in both ‘Erp.Contracts.BO.Part, Version=10.2.300.0, Culture=neutral, PublicKeyToken=5d3fa3c7105d7992’ and ‘Erp.Contracts.BO.Quote, Version=10.2.300.0, Culture=neutral, PublicKeyToken=5d3fa3c7105d7992’

And I added an additional reference Erp.Internal.Lib.PartPlnt and added code in 2 different places and still get “PartSubsTable” exists in both Erp.Contracts.

This is what is happening. When the quote is created into a Sales Order, I check the Part Maintenance and the Part, Part Plant and Part Warehouse is showing. But when I open the Sales Order and go to the Release Tab, the Make Direct is checked. When I am unchecking the Make Direct, I get an error message saying "Invalid Warehouse for the Site. I go back into Part Maintenance and add a new warehouse and select that as the Primary Warehouse and then select the original warehouse that the directive is creating as the Primary Warehouse and delete the 2nd warehouse I added. I go back into the Sales Order and make sure the Make Direct is unchecked and click Save, no error message.

What am I missing?

Hi Lynn,

Just to put this out there, in case you are not aware, can you use the configure button on the Quote Line to get your part master part with unique number? We do this on our sales orders. We do not actually use the configurator for anything except automatically creating a new part master record with plant / warehouse.
If you would like any further details on our setup, let me know I’d be happy to provide.

Nancy

1 Like

Yes, Please.

Ok, so we do not do this on our quotes, but we do it on sales orders. As per above screenshot, it may be setup for Quotes, and the configuration entry below will show that with the “Target Entities”. First, we have part templates that get copied. Our configured templates are based on product lines of R, F, XG, etc. We have standard product part numbers in these product lines so because these will need configuration we call them R-ENG, F-ENG, XG-ENG. See below for part setup for one of these part master templates, F-ENG, tied to our “Generic Configurator” to get part added to part master when configure button clicked on sales order, also per below. It might look a little complex, but once setup it functions nicely for this need for us.

Configurable part no setup in Part Master:


When placed on a sales order, enter quantity on line, then click Configuration button, see our Configurator designer layout (also shown further below) and click save. Get new Part in part master with our plants and warehouses… note, you can get it to make a rev too, we use no rev as a hold for work point so don’t do that today:




Back in Part Master, I get duplicate record for the F-ENG but called F-ENG-39998-1. Note it did inherit the req’d (because configurable part F-ENG needed it) Nonstock flag but I am able to now save it unchecked. If this was needed, a BPM could be done to do this… my Part Desc from Sales Order save doesn’t work, and I use a BPM to put it on the new part record in part master after configurator added it.

Now onto the configurator. There’s configurator entry and configurator designer. Here are our settings for it. I am far from expert on it, but these work fine for us to date. When you do a new Configurator Entry you get the ability to see more “Target Entities” (e.g., Quote dtl) than seen in our target entities, for places where you want configure button enabled.



Thank you for the information. With the directives I have in play it is creating the part in the background. I did this due to the time it takes to create these parts. The process you use is more steps then what my directives are performing.

It is very interesting this process and again thank you for sharing. I am just trying to figure out why the PartWhse record is not committing to the database. Once I figure this out it should work with no issues.