11/26/2024 4:27:14 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!
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
|
|
|
|
Customising the Opportunity Product list view
Posted: 25 Aug 06 12:54 PM
|
fiogf49gjkf0d I need to customise our Opportunity Product to contain extra information relating specifically to the opportunity product.
I created an extention table called C_OPP_PROD_EXT, and a data form System:C_OpportunityProductExt that will allow a user to add the extra information. I added an extra popup on right-clik called "Edit Opportunity Product" that calls the Opportunity product extention form. The idea that I have is to allow the addition of extra detail for the opportunity product on the Opportunity product extention form, and then to add the information to the Opportunity Product data grid.
I have encountered two obstacles:
1. I don't know how to get the OPPPRODUCTID. I tried application.BasicFunctions.ShowViewForRecord "ABC_OPP_PRODUCT_BUS", "System:Opportunity Product Detail", grdProducts.KeyField when calling the field, but the value of "grdProducts.KeyField" is the literal "KEYFIELDID" and not the actual OPPPRODUCTID.
I tried to look to the delete code to see how it determines the OPPPRODUCTID, but I can't quite figure it out.
strSQL = "Delete From OPPORTUNITY_PRODUCT " _ & "Where OPPORTUNITYID = '" & Application.BasicFunctions.CurrentOpportunityID & "' " _ & "And OPPPRODUCTID " 'It looks like someting is missing here
RemoveProducts True, strSQL 'Is RemoveProducts some kind of script? I tried searching, but did'n find anything
2. I can't seem to edit the columns that display in the Opportunity Product grid. I tried the SQL property which just seems to be the link to the table, and I also tried the Columns property, but that is even more confusing, because I can't even see the Opportunity Product table when I try to add a column
If there is a better way to do this than what I am currently trying, I would love to get some advice.
Thanks very much! |
|
|
|
Re: Customising the Opportunity Product list view
Posted: 26 Aug 06 11:50 AM
|
fiogf49gjkf0d OK, I have the answer to my first question
The correct code I should have used to launch the edit form is:
application.BasicFunctions.ShowViewForRecord "ABC_OPP_PRODUCT_BUS", "System:Opportunity Product Detail", grdProducts.GetCurrentField (not grdProducts.KeyField)
I am still not sure about the second question, though.
How do I edit the columns that display in the Opportunity Product grid?
Anyone done this before?
|
|
|
|
Re: Customising the Opportunity Product list view
Posted: 27 Aug 06 2:18 PM
|
fiogf49gjkf0d Actually.. the "problem" starts way back at the "global" level with "Product". Since none of this stuff (product/opp product) uses bound datagrid(s) you have to "hack" a bunch of stuff. There's a lot of common code between teh "product" and Opportunity subsystem and it's a bit nasty. Mike Spragg did post (somewhere.....) a bunch of stuff on this. I have my own version of the same thing but it's quite lengthy with an example(s), etc.
MY approach is NOT to use custom 1:1 table(s) but rather to modify the core (OOTB) SalesLogix table(S). If done correctly (and theay I do it is .. you are 100% compatable w/Scorpion (v7.0) where you CAN modify core tables.
I'll look thru my archives and see if I can put up a clean example of just how to do this. -- rjl
|
|
|
|
Re: Customising the Opportunity Product list view
Posted: 28 Aug 06 8:49 AM
|
fiogf49gjkf0d I was going to make a similar recommendation in using the core table(s) to store the custom data. My suggestion was to first use the available userfields (userfield0 to userfield9) then add a new field if they are not enough. The only thing with using the userfields is documenting them so you know what they are used for. I forget if there is a field description in the DB manager, but that would be the place I'd document it.
John G. |
|
|
|
Re: Customising the Opportunity Product list view
Posted: 05 Sep 06 3:40 AM
|
fiogf49gjkf0d Thank you very much for your post.
During my training I was told to never modify the SalesLogix core tables, so if I do it, I would like to to it in correctly (as you state here).
I would really appreciate if I can see your example of how to do this.
Thanks a lot!
Ina |
|
|
|
Re: Customising the Opportunity Product list view
Posted: 06 Sep 06 10:20 AM
|
fiogf49gjkf0d With Query Analyser or your favorite SQL tool, execute the following SQL statement, you could use the "ExecuteSQL" function of the SalesLogix Administrator too.
Update SecTableDefs Set Useref = 'T' Where TableName = 'OPPRTUNITY_PRODUCT'
Then use the DM Manager to add your fields. When you are finished adding your fields, execute the following SQL statement.
Update SecTableDefs Set Useref = 'F' Where TableName = 'OPPRTUNITY_PRODUCT'
That's all there is too it.
Hope this helps, Steve Meyers
|
|
|
|
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!
|
|
|
|
|
|
|
|