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 Reply
  • 0 in reply to Kevin M
    Hello guys,
    Tnx for the replies !
    So i can set manually the CA(he is valid Sales Tax Schedule) and I tried with dollar sign and without it.
    Its always the same: I get the old value of field showing it with MessageBox then i set the new value(which is valid Sales Tax Schedule) and press Accept (script is triggered on Postwrite)
    Then i check again the same Sales order and the value in Sales Tax Schedule is didn't change
Children