on 07-16-2009 8:28 PM
Hi
I am using this code to retirve my last Service Call Added but retuning Blank
dim vlastServiceCall as string
vCmp.GetNewObjectCode (vlastServiceCall)
MsgBox ("Added QuoteNo:" & vlastServiceCall)
msgbox just shows:Added QuoteNo:
servicecall is added but not returning last Service Call
Thanks
try to use
vlastServiceCall = vCmp.GetNewObjectKey()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Try this one instead:
Dim vlastServiceCall as string
Dim gRec As SAPbobsCOM.Recordset
Set gRec = vCmp.GetBusinessObject(BoRecordset)
gRec.DoQuery "SELECT MAX(CALLID) AS MAX FROM OSCL"
If Not gRec.EOF Then
gRec.MoveFirst
vlastServiceCall=gRec.Fields.Item("MAX").Value
End If
MsgBox ("Added QuoteNo:" & vlastServiceCall)
Regards,
Gilbert Ngo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
May be i can give u the reason for the why part.....
Generally for all the marketing documents in SAP B1 we have DocNum and DocEntry but only for service calls and Employee master data we do not have these fields instead we only have callID and empID respectively, so i guees beacause of this the GetNewKey could not work.
Hope it helps,
Vasu Natari.
User | Count |
---|---|
91 | |
7 | |
7 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.