Skip to Content
0
Jun 26, 2014 at 11:54 AM

Linking an Activity to a Sales opportunity

153 Views

Hello all,

I can't seem to link or add an Activity to a Sales opportunity stage via the SDK. I am doing it during the addition of the Activity by assigning the fields SalesOpportunityId and SalesOpportunityLine with the desired LineNum and the Activity's DocEntry respectively.

The resulting Activity is not connected with a Sales opportunity, its SalesOpportunityId and SalesOpportunityLine containing null. The Sales opportunity exists in the B1 database and I have no problem additing to it an Activity via user interface.

Here's how I do it: http://pastebin.com/2MGg0TAK. Could you help me make it work?