Examples of using BOs inside of UI customization

I have two issues.

  1. attempt to automate the Save button on the ConfigurationRuntime Entry. That window is from the Configure Button on the SO detail tab. for whatever reason, I can not put a customization on that module.
    ProcessCalling
    When I open it in developer mode and select the Base Only checkbox, I get a compiling error.
    Application Error
    If I don’t have the developer mode on, then all is good. I have tried to save a customization and I can not remove the compile error. That is without adding anything to the customization.

  2. Attempt to automate the configure Button functionality. There are 2 reasons for this a) another option to automate the save button b) if possible to replicate the functionality, then try to loop through an entire SO’s lines running the process.

In the tracing of the button, I came across a BO called “Erp.Proxy.BO.ConfigurationRuntimeExtImpl”. It does not have an adapter associated with it. I have not accessed the functionality of a BO before.

So, I am hoping that someone can throw me a snippet of code to know how to initiate and use a BO inside of a UI customization. :wink: :call_me_hand:t3:

That’s on a configurator, you can’t do it that way.
Here is a good thread for reference:

It would be better for you to explain what you are trying to do before we just throw code at you.

Give us some more info so we can respond with something more relevant.

I thought I explained what I am trying to do. Let me try again. Below is the function that I am trying to replicate the Configure Button from the Sales Order Detail tab on the Sales Order Entry. The code below is to begin an attempt to call the methods that I found in the tracing.

From the tracing that I did, ConfigurationRuntimeExt ojbect calls “StartPcValueConfiguration”. It does not have an associated Epicor adapter. I just need an example of how to initiate and use a business object.

This code is just to get a proof of concept right now.

   private void btnConfigure_Click(object sender, System.EventArgs args)
   {
   	if(sSourceType == "S")
   	{
   		string cfgPartNum = string.Empty;
   		string cfgRevisionNum = string.Empty;
   		string configType = string.Empty;
   		string configID = string.Empty;

   		bool bSourceSet = setSourceValue();
   		if(bSourceSet == true)
   		{
   			ConfigurationRuntimeAdapter PartConfigAdapter  = new ConfigurationRuntimeAdapter(UD01Form);
   			PartConfigAdapter.BOConnect();
   			callSO_GetBasePartAndConfigType(new Guid(getDataFromSalesOrderDS(nSalesOrder, nLineNum, "SysRowID")), out cfgPartNum, out cfgRevisionNum, out configType, out configID);
   			//call GetNewPcConfigParams
   			PartConfigAdapter.GetNewPcConfigParams(getDataFromPartDS(sPartNum, "ConfigID"), "0/0");
   			//Set PcConfigurationParams DataTable values
   			PartConfigAdapter.ConfigurationRuntimeData.PcConfigurationParams[0]["PartNum"] = cfgPartNum;
   			PartConfigAdapter.ConfigurationRuntimeData.PcConfigurationParams[0]["RevisionNum"] = cfgRevisionNum;
   			PartConfigAdapter.ConfigurationRuntimeData.PcConfigurationParams[0]["ConfigID"] = configID;
   			PartConfigAdapter.ConfigurationRuntimeData.PcConfigurationParams[0]["ConfigType"] = configType;
   			PartConfigAdapter.ConfigurationRuntimeData.PcConfigurationParams[0]["RelatedToTable"] = getRelatedToTable();
   			PartConfigAdapter.ConfigurationRuntimeData.PcConfigurationParams[0]["RelatedToSysRowID"] = getDataFromSalesOrderDS(nSalesOrder, nLineNum, "SysRowID");
   			PartConfigAdapter.ConfigurationRuntimeData.PcConfigurationParams[0]["UniqueID"] = "0/0";
   			PartConfigAdapter.ConfigurationRuntimeData.PcConfigurationParams[0]["TestMode"] = "PRODUCTION";
   			PartConfigAdapter.ConfigurationRuntimeData.PcConfigurationParams[0]["SourceTable"] = "PartRev";
   			//call PreStartConfiguration
   			PartConfigAdapter.PreStartConfiguration();

   			//call StartPcValueConfiguration();
   			//ConfigurationRuntimeExt configurationExtBO;


   			PartConfigAdapter.Dispose();
   		}
   	}

   }

You’re explaining HOW you want to do something but not really the WHY and for WHOM. You have a business problem that you’re trying to solve. This is what Kevin is asking for. You also have a technical problem with a solution which may or may not be possible to do. Knowing the business problem might lead to an easier solution.

2 Likes

Pretty much it exactly.

You are running a configurator which we do not have access to, nor know what it does.
It may have black box functionality etc. Determining the whole problem of what and why
will let us help you better.

I’m just trying not to send you down the wrong path by throwing red herrings at you.

If you really just want to know the answer to that specific question, the answer is I wouldn’t.
The way forward is really to do this server side anyway.

Since you can’t customize the form, I imagine you will have to do something to either recreate
it, or modify the behavior in a bpm.

I would either call a function, baq bpm, etc. Or possibly do what you need in a pre or post processing
BPM. The thing is, I don’t know what you’re doing :rofl:

Especially since you’re pretty up-to-date and the .NET client getting less love.

Have you done Zero Input configurators? Might be a solution here but without knowing the business problem, it’s hard to say.

1 Like

Thanks @Mark_Wonsil & @klincecum ,
Let me slow down. I do not know what you mean by

We have a team setting up the configurator and all that goes with it.

We are in the process of switching over to Epicor. We have a mass amount(multiple 100s to a 1000 parts) of configured parts that need to be pulled in.

From my understanding, the only way to configure a part is to run it through the Quote or Sales Order process. So we DMT’d a sales order with many lines that has the specific parts needed to be configured. In the DMT file. The Smart String field on the SOLine is populated for the configuration process. This is just to have the part created.

Right now, an individual needs to manually open the Sales Order, and then click on the Configure button and then save inside the Configuration screen. Then they move to the next line. this is becoming very time consuming.

The idea to create a screen that can automate this process may be come useful beyond this initial importing of configured parts. We also had an individual that heard that we would attempt this automation and thought that it may be useful in the quoting process as well.

So I agree with both of you, “Why do we need this?” The answer is, initially, just to pull in configured parts and possibly for the quoting process in the future.

Just one of the many things that I am missing in knowledge is, if there is another way to configure parts besides through Quoting and Sales Orders. I think I was told POs is another process. But is there a way to do it just on adding the part?

I have been told that when a sales order line is create, the configure button will still need to be created to pull in the pricing that was set up in the configuration process. But they still want to have the parts initially set up in Epicor.

Bing. Bing. Bing. There we go! That IS a business problem.

Interesting choice to create part numbers. Are we not make to order?

A No Input Configurator is just that. There are no inputs to fill out. HOWEVER, when a configurator runs, you can populate variables that are used to do the Get Details rules. The configurator should be able to get your Smart Part number, parse it, populate the variables and the Get Details will work when the job is engineered.

Help me out. Do you mean that the configuration process does not need to be saved? And that when a job is created the GetDetails function will pull in the all of the data somehow?

What are your thoughts when you mentioned “Make-to-Order”?

I’m getting further away from my Configurator days, so I’d have to check if I did or not. Give it a whirl. :person_shrugging:

Shipping from a Job and not having a Part number, i.e. using Part on the Fly. Also called Make Direct.

What does your configurator do that is special ? Can you not just dmt your parts in as is?

1 Like

I am not sure completely. My understanding is that it will splice the Smart String to identify if all of the components are valid. If the part does not exist , then it will create it by duplicating the ConfigPart. Pricing is also done and assigned to the associated Sales Order / Quote.

That is a very simplistic account of how the configurator is set up.

While yes, the Configurator can create parts for you, it’s not necessary to have them to ship product.

If I follow what Kevin is saying, if they are determined to have part numbers - even if only because the old system did - then you could add them ahead of time with DMT and then do your configurations.

Don’t get me wrong, Make Direct may not work for all situations but just want to be clear that in a highly configurable environment where there is active engineering changes, it’s better to do Make Direct and build the method for every order.

1 Like

What I’m saying is if there are pre-determined part numbers, I would gather the information to put
them in directly, instead of manually through a configurator.

1 Like

You can use the lookup function in the SSRS report to get data from another query into your current query.

We had a similar situation where there is report of open POs but we also needed the total quantity on hand and consumption in the last 3 months. So the SSRS report was based on open POs and used lookup function to get the data into the report from the other 2 BAQs on the RDD.

All the Configurator does at the end of the day is spit out a MOM. @DGodfrey , are you just trying to bring your MOMs (BOM + Routing) into Epicor from the old system?

@jkane , We utilize the Configurator to intelligently build out the BOM and BOO. From my understanding. It will also build a pricing based on the customer.

So I am going to create an Epicor Function to do all of this, since it is easier to do it on the server side.