Epicor Help for users of Epicor's variety of products.
This forum serves as a means of discussion and troubleshooting as a complement to Epicor Technical Support.
Epicor为Epicor各种产品的用户提供的帮助。该论坛是讨论和故障排除的一种手段,是对Epicor技术支持的补充。
Hello, we noticed you are blocking ads.
We HATE intrusive ads too, however ads are helping us defray the cost of running this site
We would greatly appreciate it if you would consider making an exception for e10help
I have been trying to figure out the functionality behind the “Create Jobs” button on the summary page of Order Entry program. Basically when you click on it, it creates jobs for line releases that are set as ‘Make Direct’. 我一直在试图弄清楚订单输入程序摘要页面上的“创建作业”按钮背后的功能。基本上,当您单击它时,它会为设置为“直接生成”的行发布创建作业。
I have been trying to automate this so when user creates lines and saves, I would call the methods required to create jobs. I have done tracing and debugging on adapter methods but I have not been able to catch anything. 我一直在尝试自动化这一点,因此当用户创建行并保存时,我会调用创建作业所需的方法。我已经对适配器方法进行了跟踪和调试,但我无法捕获任何内容。
Have you guys ever tried to automate this button’s functionality? 你们有没有尝试过自动化这个按钮的功能?
I would appreciate your help and feedback! Thank you! 感谢您的帮助和反馈!谢谢!
I’ve never dealt with it, but if the intention is just to call that on save, it should be straight forward (assuming there are no repercussions for calling it when unneeded - for example, user clicks save multiple times) 我从未处理过它,但如果目的只是在保存时调用它,它应该是直截了当的(假设在不需要时调用它没有影响 - 例如,用户多次点击保存)
//on save (get this even either from the toolclick or by after adapter method Update 在保存时(甚至从 toolclick 或通过 adapter 方法更新后获取此信息
Find the guid of the button. 找到按钮的 guid。
var myButton = (EpiButton)csm.GetNativeControlReference(“The guid here”); var myButton = (EpiButton)csm。GetNativeControlReference(“此处的 guid”);
myButton.PerformClick(); myButton.PerformClick();
Great solution, however I have been looking for a solution that is independent of the UI where I can call elsewhere. 很棒的解决方案,但是我一直在寻找一种独立于 UI 的解决方案,我可以在其他地方调用。
Thanks and I appreciate your time 谢谢,感谢您抽出宝贵时间
ADVERTISEMENT 广告
knash 纳什Ken Nash 肯·纳什2023.1.8 Starting to Uplift to Kinetic Screens "Serenity Now" 2023.1.8 开始提升动感屏幕“现在的宁静”
We created a BPM to create jobs. Is that what you are trying to do? or in C#? 我们创建了一个 BPM 来创造就业机会。这就是你想做的吗?还是在 C# 中?
We started the C# route, but then went with using the BPM widgets. 我们开始了 C# 路线,但后来使用了 BPM 小部件。
We invoke the BPM by creating a row in a UD Table. We fill the UD fields of the UD table with the information needed for the job. This then lets us use the UD update pre processing BPM widgets to create job, fill job with information, then save all using widgets. The UD table also lets us track who is creating jobs, but you might not need that. 我们通过在 UD 表中创建一行来调用 BPM。我们用作业所需的信息填充 UD 表的 UD 字段。然后,我们可以使用UD更新预处理BPM小部件来创建作业,用信息填充作业,然后使用小部件保存所有工作。UD 表还允许我们跟踪谁在创造工作,但您可能不需要它。
I dont have time at the moment, but i was in your shoes and wanted to know what that button does, I’d use a decompiler like ILSpy, DotPeek, etc to look at the code of that form dll 我现在没有时间,但我站在你的立场上,想知道那个按钮是做什么的,我会使用像 ILSpy、DotPeek 等这样的反编译器来查看该表单 dll 的代码
I am hoping for a simple and straightforward solution like whateverObject.CreateJobs(orderNum); 我希望有一个简单明了的解决方案,例如 whateverObject.CreateJobs(orderNum);
I did trace the Job Entry program while creating a job for a sales order and added material and then checked all the method calls. I was able to mimic the process and create jobs using C# code but it is not a very clear process and sometimes it just fails to create jobs. It involves creating rows in the following tables: 在为销售订单创建作业并添加材料时,我确实跟踪了作业输入程序,然后检查了所有方法调用。我能够模仿该过程并使用 C# 代码创建作业,但这不是一个非常清晰的过程,有时它只是无法创建作业。它涉及在下表中创建行:
JobHead 职位主管
JobAsmbl
JobPart 工作零件
JobProd 工作产品
It is like a few hundred lines of code where you have to enter lots of information into those tables for the job you are creating. 这就像几百行代码,您必须在这些表中输入大量信息才能创建作业。
But when you click on the ‘Create Jobs’ button on the Order Entry program, it literally takes 2 seconds for the system to generate jobs, so I am still not sure how they do it. And am surprised that the code is not available for us. (Tracing does not register the method calls when you click on that button). 但是当您单击订单输入程序上的“创建作业”按钮时,系统实际上需要 2 秒钟才能生成作业,所以我仍然不确定他们是如何做到的。令我惊讶的是,该代码不适用于我们。(当您单击该按钮时,跟踪不会注册方法调用)。
The BO do a ton of the heavy lifting (as when you create a job and add a part, the other tables you mentioned get filled out epimagicly) BO 做了大量的繁重工作(例如,当您创建作业并添加零件时,您提到的其他表格会被奇妙地填写)
I was hoping to get rid of the large code I have as it sometimes fails to do the job! The failure is usually when I call this method: 我希望摆脱我拥有的大代码,因为它有时无法完成工作!失败通常是当我调用此方法时:
jobBO.GetNewJobProd(…) jobBO.GetNewJobProd(...)
If any of you find a super short way to generate jobs (blank jobs linked to order line releases without anything in them) please let me know. I appreciate your help 如果你们中的任何人找到一种超短的方法来生成作业(链接到订单行发布的空白作业,其中没有任何内容),请告诉我。感谢您的帮助
I was able to create a “Quickjob” using a BPM and widgets… the nice thing about quickjob is that by setting parameters, you can specify all the facts up front, and then tell the quickjob Business Object to do the work. It reports back the job number that was created. 我能够使用 BPM 和小部件创建“Quickjob”......Quickjob 的好处在于,通过设置参数,您可以预先指定所有事实,然后告诉 Quickjob 业务对象来完成工作。它报告已创建的作业编号。
If you run a trace while using QuickJob to create a sample job, you can find the business object called, and the parameters used. 如果在使用 QuickJob 创建示例作业时运行跟踪,则可以找到调用的业务对象以及使用的参数。
We also do this via BPM rather than the client. You do need to be quite exact passing the table values between the components of the OrderJobWiz BO, from memory, but otherwise it works quite seamlessly. I wouldn’t call it super-quick, mind you. It usually takes 3-5 seconds per job. 我们也通过BPM而不是客户端来做到这一点。您确实需要非常精确地从内存中在 OrderJobWiz BO 的组件之间传递表值,但除此之外,它可以无缝地工作。请注意,我不会称它为超快。每个作业通常需要 3-5 秒。
I have no reason to suppose the same wouldn’t work from within a customization, but our users prefer the process not to delay them between lines, rather have it kick off once they’ve completed the order, so I have never tried. I think I’d still be inclined to use a BPM even so, though.
In QuickJob Entry you must enter part numbers… I don’t think you can use it to just create a job and assign it to an order line release without having any part numbers.
Everything you need should be contained within the JobEntry adapter.
Connect to Adapter
GetNewJobHead
GetNextJobNum
Fill in your JobEntryData jobhead dataset
Update
GetByID (created job)
GetNewJobProd
Update
GetDetails
Update
I use this to create my orders and then jobs from project entry.
I have done this and it works 99% of the time!! Sometimes it fails on jobBO.GetNewJobProd(…) and a re-login or IIS cache flush fixes it.
Problem is I didn’t want to do loads of code, filling datasets, updating many tables and so on just to create empty jobs. I thought maybe somewhere inside one of these business objects there is a method that can be called with only order number as the parameter and let it create jobs… preferably an Epicor method… similarly mimicking what happens when user clicks on the ‘Create Jobs’ button. I am basically trying to simplify the already big solution I have in place that works 99% of the time!!!
The trace shows that ValidateJobs is called before CreateJobs. I still need to know how to fill the dataset that is being passed to ValidateJobs and then CreateJobs.
The trace doesn’t seem to have everything. Was hoping for something like this to work:
string errMsg = string.Empty;
string warningMsg = string.Empty;
OrderJobWizImpl bo = WCFServiceSupport.CreateImpl<OrderJobWizImpl>(_userSession, OrderJobWizImpl.UriPath);
OrderJobWizDataSet ds = bo.GetMatrix(10165, 0, 0);
bo.ValidateJobs(ds, out warningMsg);
bo.CreateJobs(ds, out errMsg);
But it does not create jobs even if you mention the line and release numbers. Also you must enter ship by date on the release prior to attempting to create jobs using the wizard according to the documentation and still no luck.