Hi smart people,
has any one done similar code in ERP10, this seems to work for Epicor previous versions, as i tried it, it is error out at BOReader, i have tried most of suggestion on this post, but no luck, could anyone help please, i am trying to add PORel.NeedByDate to the Demand Grid in Job Manager ?
I havenât looked at the grid and form youâre asking about, but in general if thereâs a field not in a grid that you want to see, there are two main options and one probably over-complex one, depending on the particular case.
Is the field you want actually within the EpiDataView the grid is bound to? If so, option one is very simple, and you can make it visible in the grid column collection.
If the field is NOT in the EpiDataView, then it might be easiest to swap out the grid entirely for one based on a BAQView that DOES show what you want. That isnât trivial, but there are good guides to it in posts here, and @josecgomez is the expert.
Last resort if you are comfortable with DataTables and getting deeper into the code is manually adding a column to the underlying DataTable, which looks like is the general approach in the code youâve posted. That is possible but seems overkill in most circumstances.
the 1st option is obvious my friend, the filed i need is not within the EpiDataView, and i have done the 2nd option in other cases but on this one i can not replace the Custom BAQ because it is functional to many tracker buttons, this left me with 3rd option which is code my field to appear within the custom grid including call itâs value from the Database.
Sorry, I donât mean to offend you! I know I get stuck looking for complicated solutions quite often when a simpler one would do.
Given that youâve already ruled out the simpler options then yes, you need to get quite manual here. Having a data call for every row in the grid feels a bit extreme to me, though. If that is what you want to do then I think the E10 way is to use a dedicated adapter to do so. PORelSearch seems like it would do the job, and you would essentially swap out the code that uses boReader for it.
Personally I would prefer an approach that retrieved the relevant data once when the EpiDataView is updated, and added it to the DataTable then, I think. But you know your needs best!
no problem at all, i am just explaining my case, my Background is Manufacturing Engineering, the last coding language i worked on before Start customizing Epicor was Fortran and Pascal, C# is the first Object-Oriented Programming language i use, i found it very powerful dealing with database with loads of libraries or what we used to call âsubroutinesâ, so long story short i have not got a wide knowledge of using such commands, could you please elaborate a bit more, it will be very useful if you give an example of what you mean here.
thanks in advance
For me, Epicor is a whole other world in itself and not much experience of mine elsewhere has been much use to me! But Iâm learning.
Hereâs an adapter call that Iâm using somewhere. I think youâll see itâs similar to the BOReader parts of the code youâve already posted and could be adjusted to work the same way. As I say, it feels a bit strange to me to be doing this for every row of a grid, but alternative solutions would need a whole lot more re-engineering.
Many Thanks Dan, i found and added the BOReader :)and The Core, code compiled fine, then start add my custom code and it is error out at
private BOReaderImpl _boReader;
i am testing my code line by line, do i need to add the whole modification and test ?
compiled failed when removing Core, so i have added it back and added what you suggested as well âEpicor.ServiceModelâ, i have added my custom lines, the whole code complied fine now, however :) my added field does not show any value
and this my code, (i am testing this code on Scheduling Resource Tracker Screen as i have manged to add the field but failed to bind it to Epicor DataBase)
// **************************************************
// Custom code for ResourceSchedForm
// Created: 27/09/2018 13:43:48
// **************************************************
using System;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Windows.Forms;
using Erp.Adapters;
using Erp.UI;
using Ice.Lib;
using Ice.Adapters;
using Ice.Lib.Customization;
using Ice.Lib.ExtendedProps;
using Ice.Lib.Framework;
using Ice.Lib.Searches;
using Ice.UI.FormFunctions;
using Ice.Contracts;
using Ice.Core;
using Ice.Proxy.Lib;
public class Script
{
// ** Wizard Insert Location - Do Not Remove âBegin/End Wizard Added Module Level Variablesâ Comments! **
// Begin Wizard Added Module Level Variables **