Cannot add an Activity by sending a Quotation
Tom Verkerk
Hello,I want to Add an Activity when I sent a Quotation.
I used the following script in the CommonScript that I found on the forum but by me it doesn't work.
I set DoublePass on True.
Dim depth As Integer
Dim isFC,FTRendered As Boolean
Dim dvat As Double
Private Sub LD_AfterPrint(company As SAPbobsCOM.Company , sendToPrintDriver As Boolean)
If Engine.IsDoublePass Then
If GetData("LD.Par.FormType"="149") Then
'msgbox("SELECT Printed FROM O@@RDR WHERE DocEntry = " & GetData("LD.Par.DocEntry"))
'If Document("Printed") = "Y" Then
Dim cts As SAPbobsCOM.Contacts = company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oContacts)
cts.CardCode = GetData("B1_Data.BusinessPartner.CardCode")
'cts.SalesEmployee = GetData("B1_Data.UserDetails.USERID")
cts.Details = "Angebot " & GetData("B1_Data.Document.DocNum")
cts.DocEntry = GetData("B1_Data.Document.DocEntry")
cts.DocTypeEx = GetData("B1_Data.Document.ObjType")
Dim i As Integer = cts.Add()
If i <> 0 Then
System.Windows.Forms.MessageBox.Show("Fehler " & i & " Text " & company.GetLastErrorDescription(), "Fehler")
End If
'End If
End If
End If
End Sub
0
Please sign in to leave a comment.
Comments
0 comments