ACT! SDK

Associate New Sale with Contact


Microsoft Visual FoxPro

oViews = oApp.Views
oContactView = oViews.CreateEx(1, "CV", 2)

* Select the Sales/Opportunities tab.
oContactView.SetActiveTab("Sales/Opportunities")

* Go to the contact for which to list the Sales records.
oContactView.Goto(ContactId)

* Set the Sales Grid object.
oSales = oContactView.Sales

? oSales.GetRowCount, " Sales for this Contact"

For i = 0 To oSales.GetRowCount - 1
   ? oSales.GetField(SLF_Status, i), ;
       oSales.GetField(SLVF_ProductName, i), ;
       oSales.GetField(SLVF_TypeName, i) , ;
       oSales.GetField(SLF_SaleDate, i)

   ? oSales.GetField(SLF_Units, i), ;
       oSales.GetField(SLF_UnitPrice, i) , ;
       oSales.GetField(SLF_Amount, i) , ;
       oSales.GetField(SLVF_Competitors, i)

Next i

 

Microsoft Visual Basic

Sales Method (requires ACT! 2000 or later)

Description    Returns a dispatch pointer to the grid object for the Sales tab.

Object            ContactView

Syntax            object.Sales

Return type   Object/LPDISPATCH

See also         CompleteSale, CreateSalesForecast

Example         'The following sample lists Sales records for a specified contact.

Set objViews = objApp.Views

Set objContactView = objViews.CreateEx(1, "CV", 2)

'Select the Sales/Opportunities tab.

objContactView.SetActiveTab "Sales/Opportunities"

'Go to the contact for which to list the Sales records.

objContactView.Goto ContactId

'Set the Sales Grid object.

Set objSales = objContactView.Sales

List1.AddItem objSales.GetRowCount & " Sales for this Contact"

For i = 0 To objSales.GetRowCount - 1

   List1.AddItem objSales.GetField(SLF_Status, i) & "  " &

       objSales.GetField(SLVF_ProductName, i) & "  " &

       objSales.GetField(SLVF_TypeName, i) & "  " &

       objSales.GetField(SLF_SaleDate, i)

   List1.AddItem objSales.GetField(SLF_Units, i) & "  " &

       objSales.GetField(SLF_UnitPrice, i) & "  " &

       objSales.GetField(SLF_Amount, i) & " " &

       objSales.GetField(SLVF_Competitors, i)

Next i

 


ACT! SDK
ACTHelp.com
CICorporation.US
202-829-4444