Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, November 22, 2024 
 
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 ThreadView:  Search:  
 Author  Thread: Opportunity Products
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Opportunity ProductsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Sep 07 8:17 AM
Hi,

Does anyone know if Opp products, competitors and contact are supposed to be on the insert opportunity screen? I have looked at the pages and code and it looks as though these items should be here, but all I have are the standard opp fields (name, status, account manager etc.)?

Thanks
nick
[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Opportunity ProductsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Sep 07 3:05 AM
Yes, they are they normally.
This sounds like you either have reverted to legacy or someone's simply modified the form ! Check in Architect and re-release the original.
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: Opportunity ProductsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Sep 07 3:38 AM
that sounds like LAN?
[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Opportunity ProductsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Sep 07 4:03 AM
And you'd be right !! However, same sort of thing for web - if they have modified the forms etc. But, no - it's not right.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Opportunity ProductsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Sep 07 1:55 PM
It looks like they started to build those into the Insert opp screen, but never finished it or something. Looking at the page in AA, the product and contact areas are loaded on the page in the DialogWorkspace, although there is nothing that loads them in that workspace. No buttons or anything added to invoke them.

So, OOTB..no, they are not there. But it looks like they started to add them, just never fininshed that up.

-Ryan
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: Opportunity ProductsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Sep 07 2:08 AM
Thanks Ryan, as I thought but good to get the experts opinion! On attempting to add the products grid onto the page, when you use the add button it gives the usual Object not set to instance of an object, as expected - just need to figure out how to put the products and other parts on this screen I guess! Although not sure what they would be bound to, as the opp doesnt really exist yet....oh well - trial and error time!
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Opportunity ProductsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Sep 07 11:08 AM
Yeah, my guess is this is the very reason why it isn't complete in the OOTB product as well. You would have to do something like create a SmartPart that allowed for adding the products, but instead of calling the Save business rule on the Opp product objects, you would instead put them into the state of the page. This may or may not be the best, or even good idea - but it is the first to come to mind.

Something like this (as long as your SmartPart inherits from EntityBoundSmartPartInfoProvider):

//assuming you already have a populated OpportunityProduct object at this point. 
//this will save the object into a collection in the State so you will have access to it
//from your code when the "OK" button is clicked on the Insert Opp form.
//All this is untested of course

Sage.Entity.Interfaces.IOpportunityProduct oppprod = this.BindingSource.Current as Sage.Entity.Interfaces.IOpportunityProduct;
//oppprod is my already populated object that was bound to the form.
//instead of calling it's Save method, will store it in the State to call this later.

List<Sage.Entity.Interfaces.IOpportunityProduct> list;

if (this.PageWorkItem.State["OppProductsList"] == null)
list = new List<Sage.Entity.Interfaces.IOpportunityProduct>();
else
list = (List<Sage.Entity.Interfaces.IOpportunityProduct> )this.PageWorkItem.State["OppProductsList"];

list.Add(oppprod);


Then, when the Save button on the main Insert Opp form is clicked, you'll grab that collection, go through and set the parent of each to the Opp and then call the Save method of each. Something like this:

Sage.Entity.Interfaces.IOpportunity opp = this.BindingSource.Current as Sage.Entity.Interfaces.IOpportunity;

List<Sage.Entity.Interfaces.IOpportunityProduct> list;

if (this.PageWorkItem.State["OppProductsList"] != null)
list = (List<Sage.Entity.Interfaces.IOpportunityProduct>this.PageWorkItem.State["OppProductsList"];

if (list != null)
{
foreach (Sage.Entity.Interfaces.IOpportunityProduct oppprod in list)
{
//order of what gets called here might need to be played with
oppprod.Opportunity = opp;
opp.OpportunityProducts.Add(oppprod);
oppprod.Save();
}
}

opp.Save();


Anyway, you get the idea. Hope this helps.

-Ryan
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: Opportunity ProductsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Sep 07 1:33 PM
Great thanks Ryan, I was considering the best way to save the products in memory. I'd actually started down the route of calling the Save() of the Opportunity when you click the Add button on the products grid, and simulating the way it works on the Opportunity Detail area (essentially giving the products something to bind to) - getting there but a lot of problems with this method along the way! If it proves to be non viable I will definitely give the above a go.

Thanks!



Nick
[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 © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/22/2024 8:43:29 PM