Sales Order Entry chaning the Schedule From VBScrip

SOLVED

Hello every one,

I`m trying to change the Schedule in Sales Order Entry .The strange thing is that im able to get the value of the field(TaxSchedule) but not to set new one

strTaxSchedule = ""

If oBusObj.EditState>0 Then

retVal = oBusObj.GetValue("TaxSchedule", strTaxSchedule)

oSession.AsObject(oSession.UI).MessageBox "", strTaxSchedule

retVal = oBusObj.SetValue("TaxSchedule", "CA")

retVal = oBusObj.Write()

retVal = oBusObj.GetValue("TaxSchedule", strTaxSchedule)

oSession.AsObject(oSession.UI).MessageBox "", strTaxSchedule

End If

Parents
  • 0
    The first thing to check is is CA a valid Tax Schedule? When you enter an order manually, can you set the value to CA? Also, if you're running the script within Sage, you don't need the Write method, the SetValue is all you need. But I don't think that would cause it to not be set correctly.
Reply
  • 0
    The first thing to check is is CA a valid Tax Schedule? When you enter an order manually, can you set the value to CA? Also, if you're running the script within Sage, you don't need the Write method, the SetValue is all you need. But I don't think that would cause it to not be set correctly.
Children