Home
|
Forums
|
Contact
|
Search
|
Syndication
[login]
[create account]
Tuesday, July 1, 2025
slxdeveloper.com
Home
Search
Contact us
About slxdeveloper
Syndication
Community
Forums
(NEW!)
Newsletter Archive
Members
Your Profile
Submit Article
General
Administration
(6)
OLE DB Provider
Miscellaneous
(2)
Architect
VBScript
(9)
ActiveX Controls
(6)
How To's
(14)
.NET Extensions
(3)
External
OLE DB Provider
(12)
SLAPI (SlgxApi.dll)
SalesLogix COM
(1)
Web
ASP/ASP.NET
(2)
Web Services
Web Client
Downloads
Samples
(17)
Documentation
(7)
Utilities
(18)
Resources
SalesLogix
(3)
Programming
(1)
6/30/2025 11:30:37 PM
slxdeveloper.com Community Forums
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Web Forums - SalesLogix Web Platform & Application Architect
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (
For version 7.2 and higher only
). View the
code of conduct
for posting guidelines.
Forums RSS Feed
Back to Forum List
|
Back to SalesLogix Web Platform & Application Architect
|
New Thread
View:
Dynamic
Flat
Tree
Search:
Author
Thread: How to mimic Insert Association Action programatically?
Veronka Capone
Posts: 113
How to mimic Insert Association Action programatically?
Posted: 09 Feb 10 7:34 AM
Hi,
I am trying to create a new record in OpportunityCampaign when Converting a Lead To Opportunity. The code:
if(opportunity != null)
{
IOpportunityCampaign opportunityCampaign = EntityFactory.Create
();
opportunityCampaign.OpportunityId = opportunity.Id.ToString();
opportunityCampaign.CampaignId = "QDEV1A0003EL";
opportunityCampaign.Save();
}
When debugging, I get the following error: Microsoft JScript runtime error: Sys.InvalidOperationException: Cannot call get_statusCode when responseAvailable is false.
Any ideas?
I was looking at Opportunity.OpportunityCampaigns they are using Insert Association Action to insert a new campaign to an Opportunity. What else do I need to add to the code?
Thanks
[
Reply
][
Quote
]
Jason Daraz
Posts: 12
Re: How to mimic Insert Association Action programatically?
Posted: 12 Feb 10 5:22 AM
Not sure what the error message means but you might wanna try something like:
if(opportunity != null)
{
ICampaign campaign = EntityFactory.GetById<ICampaign>("QDEV1A0003EL");
IOpportunityCampaign opportunityCampaign = EntityFactory.Create<IOpportunityCampaign>();
opportunityCampaign.Opportunity = opportunity;
opportunityCampaign.Campaign = campaign;
opportunityCampaign.Save();
}
[
Reply
][
Quote
]
Nick Hollis
Posts: 549
Re: How to mimic Insert Association Action programatically?
Posted: 12 Feb 10 10:51 AM
That error usually stems from a client timeout - did you get it during debugging? That sounds odd, and perhaps unrelated to your code you have posted there.
As per Jasons post if you are working with entities its best to instantiate an entity and then apply it as a property, not set the "OpportunityID" and CampaignId properties with string values.
[
Reply
][
Quote
]
Page 1 of 1
You can subscribe to receive a daily forum digest in your
user profile
. View the site
code of conduct
for posting guidelines.
Forum RSS Feed
-
Subscribe to the forum RSS feed to keep on top of the latest forum activity!
slxdeveloper.com is brought to you courtesy of
Ryan Farley
&
Customer FX Corporation
.
This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.
code of conduct
|
page cache (param): 7/1/2025 12:30:26 AM