Schedule Job from Customization - not working

Hi Kevin,



I don't have a solution but I think part of the problem is that the call
to NewRow() is returning a new row that you are storing in an "external"
data row.

I don't know if this data row is referencing the table in the adapter or
if it is its own instance. If it is its own instance then you would need
some way to pass the data row into the adapter.



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Kevin Simon
Sent: Wednesday, April 20, 2011 11:31 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Schedule Job from Customization - not working





Giving this a bump - anyone have any ideas? Where's Jose when I need
him?

Kevin

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf Of
ksimon8fw
Sent: Sunday, April 17, 2011 11:47 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Schedule Job from Customization - not working

I've got a customization in a purchase order program that under certain
circumstances that when the final material is ordered for a job, I'd
like to
schedule that job. I've got the code working that it kicks off when I
want
it to, but I'm having problems in getting the code to work. My code is
below, written in C#.

The problem I have with this code is:
(1) when I call the "MoveJobItem", which appears to be the method that
actually schedules the job (according to a trace), there's no where to
pass
the dataset with the parameters. How do I get it to recoginze the row
I've
added to the Schedule Engine?

(2) normally, when I create rows, it's preceded with a "get new".
Example:
GetNewOrderDetail precedes the update when adding a new order detail.
There
is no "GetNewScheduleEngine". I played with this a while, and saw it had
a
"NewRow" and "SaveSchedule" methods, so I'm trying those. However, I'm
not
sure if this is working, or if it's related to the first problem.

Any ideas?

Thanks in advance,

Kevin Simon

CODE SNIPPET:

ScheduleEngineAdapter adSched = new ScheduleEngineAdapter(oTrans);
adSched.BOConnect();
bool l_finished;
string c_WarnLogTxt;
DataRow NR = adSched.ScheduleEngineData.ScheduleEngine.NewRow();
NR["Company"] = SJCompany;
NR["JobNum"] = SJJobNum;
NR["AssemblySeq"] = 0;
NR["StartDate"] = SJDueDate;
NR["EndDate"] = SJDueDate;
(set rest of fields on the ScheduleEngine dataset here...)
NR["RowMod"] = "A";
adSched.SaveSchedule();
adSched.MoveJobItem(out l_finished, out c_WarnLogTxt);
adSched.Dispose();
adSched = null;

[Non-text portions of this message have been removed]




[Non-text portions of this message have been removed]
I've got a customization in a purchase order program that under certain circumstances that when the final material is ordered for a job, I'd like to schedule that job. I've got the code working that it kicks off when I want it to, but I'm having problems in getting the code to work. My code is below, written in C#.

The problem I have with this code is:
(1) when I call the "MoveJobItem", which appears to be the method that actually schedules the job (according to a trace), there's no where to pass the dataset with the parameters. How do I get it to recoginze the row I've added to the Schedule Engine?

(2) normally, when I create rows, it's preceded with a "get new". Example: GetNewOrderDetail precedes the update when adding a new order detail. There is no "GetNewScheduleEngine". I played with this a while, and saw it had a "NewRow" and "SaveSchedule" methods, so I'm trying those. However, I'm not sure if this is working, or if it's related to the first problem.

Any ideas?

Thanks in advance,

Kevin Simon

CODE SNIPPET:

ScheduleEngineAdapter adSched = new ScheduleEngineAdapter(oTrans);
adSched.BOConnect();
bool l_finished;
string c_WarnLogTxt;
DataRow NR = adSched.ScheduleEngineData.ScheduleEngine.NewRow();
NR["Company"] = SJCompany;
NR["JobNum"] = SJJobNum;
NR["AssemblySeq"] = 0;
NR["StartDate"] = SJDueDate;
NR["EndDate"] = SJDueDate;
(set rest of fields on the ScheduleEngine dataset here...)
NR["RowMod"] = "A";
adSched.SaveSchedule();
adSched.MoveJobItem(out l_finished, out c_WarnLogTxt);
adSched.Dispose();
adSched = null;
Giving this a bump - anyone have any ideas? Where's Jose when I need him?



Kevin



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
ksimon8fw
Sent: Sunday, April 17, 2011 11:47 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Schedule Job from Customization - not working





I've got a customization in a purchase order program that under certain
circumstances that when the final material is ordered for a job, I'd like to
schedule that job. I've got the code working that it kicks off when I want
it to, but I'm having problems in getting the code to work. My code is
below, written in C#.

The problem I have with this code is:
(1) when I call the "MoveJobItem", which appears to be the method that
actually schedules the job (according to a trace), there's no where to pass
the dataset with the parameters. How do I get it to recoginze the row I've
added to the Schedule Engine?

(2) normally, when I create rows, it's preceded with a "get new". Example:
GetNewOrderDetail precedes the update when adding a new order detail. There
is no "GetNewScheduleEngine". I played with this a while, and saw it had a
"NewRow" and "SaveSchedule" methods, so I'm trying those. However, I'm not
sure if this is working, or if it's related to the first problem.

Any ideas?

Thanks in advance,

Kevin Simon

CODE SNIPPET:

ScheduleEngineAdapter adSched = new ScheduleEngineAdapter(oTrans);
adSched.BOConnect();
bool l_finished;
string c_WarnLogTxt;
DataRow NR = adSched.ScheduleEngineData.ScheduleEngine.NewRow();
NR["Company"] = SJCompany;
NR["JobNum"] = SJJobNum;
NR["AssemblySeq"] = 0;
NR["StartDate"] = SJDueDate;
NR["EndDate"] = SJDueDate;
(set rest of fields on the ScheduleEngine dataset here...)
NR["RowMod"] = "A";
adSched.SaveSchedule();
adSched.MoveJobItem(out l_finished, out c_WarnLogTxt);
adSched.Dispose();
adSched = null;





[Non-text portions of this message have been removed]