Using BO in VB.net program to Delete JobOper & Detail

Jose

Thank you, Delete did it

One thing I did see was I had the JobEntry screen open and by clicking refresh the operation was still there

I had to clear the screen and re-enter the Job Number and then the operation was gone.I would think that refreshing would do it.


Thanks again

Jim


I did a trace when deleting an Operation on a Job and only shows calling JobEntry.Update

We are able to Add,,Modify, Operartion  but can not delete an operation.

Tried setting RowMod to "D" and "[Delete]" and executing the update but still does not delete a record.

Any suggestions


We are on Epicor 9.05.701  with Progress DB


Jim



CAn you supply code you already have written so we can modify it to help you. Thanks!

I'm setting the job number and assb because we are going to our test db

JobNum = "538690"




AssbSeq = 0


 




Try



Using epicorSession As New Epicor.Mfg.Core.Session(pstrEPicorUserID, pstrEPicorPassword, pstrEPicorServer, Epicor.Mfg.Core.Session.LicenseType.Default)



Dim JobConnect As New Epicor.Mfg.BO.JobEntry(epicorSession.ConnectionPool)



Dim JobDS As New Epicor.Mfg.BO.JobEntryDataSet




JobDS = JobConnect.GetDatasetForTree(JobNum, 0, 0, False, “MFG,SRV,PRJ”)




xrecords = JobDS.JobOper.Rows.Count



x = 0




Do While x < xrecords



If JobDS.JobOper(x).OprSeq = Me.txtOperSeq.Text Then



'JobDS.JobOper(x).RowMod = “[Delete]”



JobDS.JobOper(x).RowMod = “D”





x = xrecords




End If





x = x + 1




Loop






JobConnect.Update(JobDS)



End Using






 




Catch ex As Exception



Me.Cursor = Cursors.Default



If InStr(ex.Message, “Invalid user ID”) > 0 Then



MsgBox(“Not a Current Epicor User/Passord”)



Me.EpicorUserPWTableAdapter.DeleteQueryWindowsID(pstrUserID)



Else





MsgBox(ex.Message)




End If




End Try


Getting any error messages, or it's just not doing anything?


From: "cihj@... [vantage]" <vantage@yahoogroups.com>
To: vantage@yahoogroups.com
Sent: Wednesday, October 21, 2015 10:24 AM
Subject: [Vantage] Using BO in VB.net program to Delete JobOper & Detail



I did a trace when deleting an Operation on a Job and only shows calling JobEntry.Update
We are able to Add,,Modify, Operartion  but can not delete an operation.
Tried setting RowMod to "D" and "[Delete]" and executing the update but still does not delete a record.
Any suggestions

We are on Epicor 9.05.701  with Progress DB

Jim






No messages, just does not delete the JobOper record.

I currently Add Operations and Modify and everything works good,  Just can not delete


Jim



For the pstrEPicorUserID I assume that that user was set up in the SQL database. Does this user have permissions to delete? A lot of the time those users only have the right to read and right data. Deleting data is a whole different story. Can you check that and get back with me? THanks!

Actually it is myself and yes I have rights to delete.

It just seems strange that when I do a trace thru Epicor and delete the JobOper,

it only has an Update call in the trace and I can't see anywhere where the rowmod was changed


Jim



it may not change th row mod but rather run .Delete() on the row and then call Update.


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Thu, Oct 22, 2015 at 2:03 PM, cihj@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p></p><p>Actually it is myself and yes I have rights to delete.</p><p>It just seems strange that when I do a trace thru Epicor and delete the JobOper,</p><p>it only has an Update call in the trace and I can&#39;t see anywhere where the rowmod was changed</p><p><br></p><p>Jim</p><p><br></p><p><br></p><p></p>

</div>
 


<div style="color:#fff;min-height:0;"></div>