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!
|
|
Opportunity Products Add Grid
Posted: 18 Sep 07 4:33 AM
|
Hi,
I need to alter the add products screen with regard to the grid - basically I need to strip out the current columns and put my own ones in for business reasons. When trying to attempt this I get the following error:
ObjectDataSource 'dtsProducts' could not find a non-generic method 'Update' that has parameters: original_Id, Quantity, blah, blah, Id.
I believe the reason for this is that the built in function to update the datasource (the update method from Sage.SalesLogix.Opportunity.OpportunityHelperClass) does not have my new parameters. This is not a surprise as how could it know about them right?? Am I correct in this thinking> If so is there a workaround without having to write my own datagrid/datasource etc. ?
Thanks,
Nick |
|
|
|
Re: Opportunity Products Add Grid
Posted: 06 Jun 08 6:41 AM
|
Nick,
Did you get any solution for this problem? Because I am also trying to do in the same way. How to create this assembly Sage.SalesLogix.Opportunity.OpportunityHelperClass. |
|
|
|
Re: Opportunity Products Add Grid
Posted: 06 Jun 08 10:44 AM
|
No never did, luckily the requirement could be changed without too much issue. I did play around with using application/session variables, but didnt get too far... |
|
|
|
Re: Opportunity Products Add Grid
Posted: 10 Jun 08 6:53 AM
|
Sorry I did get this to work in the end, I didnt look at the post properly, and thought it was another one I posted. I had to create my own datasource and datagrid in Visual Studio. You cant use the existing entity object as in an ObjectDataSource - it isnt setup to accept you new parameters (new columns that your customisations require).
In a nutshell this involved changing the current ObjectDataSource to point to the database using the provider as opposed to using the Entity Model Object of Opportunity. |
|
|
|
Re: Opportunity Products Add Grid
Posted: 04 Sep 08 7:32 PM
|
I am trying to add 2 columns to this datasource, by pointing to the database, can i be able to continue using the select, update and delete methods? |
|
|
|
Re: Opportunity Products Add Grid
Posted: 05 Sep 08 4:09 AM
|
Im not sure if this has changed in service pack 2, but the update methods duidnt contain parameters for the new columns - I had to create a sqldatasource manually:
And use this as the grid source. But it may be possible now.....havent tried since sp1. |
|
|
|
Re: Opportunity Products Add Grid
Posted: 08 Sep 08 6:36 PM
|
Did you recreate the Select, Delete and update methods on the sqlDatasource? Also i think i need to modify the IOpportunityProduct to add 2 fields from the Product Table, is this possible? |
|
|
|
Re: Opportunity Products Add Grid
Posted: 09 Sep 08 3:18 AM
|
Yes I did - its stripping out the sqldatasource I pasted for some reason...
Yes this is possible - you can add whatever you like to the Opportunity_Product table... |
|
|
|
Re: Opportunity Products Add Grid
Posted: 09 Sep 08 10:12 AM
|
Thanks so much for this info, another question is how do i get the connection string? It throws an error, it seems it does no recognize the SLX connection. |
|
|
|
Re: Opportunity Products Add Grid
Posted: 09 Sep 08 10:20 AM
|
No problem:
Sage.Platform.Data.IDataService service = Sage.Platform.Application.ApplicationContext.Current.Services.Get(); string constr = service.GetConnectionString(); |
|
|
|
Re: Opportunity Products Add Grid
Posted: 18 May 09 1:08 AM
|
Hi Nick Hollis,
Can you advise me on this issue ? I follow the statement you given.... Sage.Platform.Data.IDataService service = Sage.Platform.Application.ApplicationContext.Current.Services.Get(); string constr = service.GetConnectionString(); But it doesn't work with my size and I got error when compiling. "The error is Tservice cannot be inferred when sage.platform.application.applicationcontext.current.service.get()". Do I need to do any setting to make the statement work ?
Thanks You
Jeffrey |
|
|
|
Re: Opportunity Products Add Grid
Posted: 19 May 09 4:09 AM
|
Hi Jeff,
The forum strips out a couple of pointy < brackets...hopefully this will render:
//Sage.Platform.Data.IDataService service = Sage.Platform.Application.ApplicationContext.Current.Services.Get();
//string connStr = service.GetConnectionString();
If it doesnt render its the above as:
//Sage.Platform.Data.IDataService service = Sage.Platform.Application.ApplicationContext.Current.Services.GetINSERTOPENPOINTEDBRACKETSage.Platform.Data.IDataServiceINSERTCLOSEPOINTEDBRACKET();
Thanks, Nick |
|
|
|