Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Sunday, February 23, 2025 
 
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!
 Architect Forums - SalesLogix Scripting & Customization
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.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Adding a Prices table to an existing Supplier table
Dave Cleary
Posts: 61
 
Adding a Prices table to an existing Supplier tableYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Apr 12 8:13 AM
fiogf49gjkf0d

Hi


I've added a Prices table to an existing Supplier table within SLX with a one to many relationship. This table will hold multiple prices for each supplier as there could be anything upto 20 different prices per supplier.


I already have a menu item that calls the suppliers where i can then right click each one and edit which then calls another screen where I can update supplier details. From this screen I want to be able to click a "Supplier Prices" button which will then call up another prices screen screen where I am able to add and edit supplier prices.


My issue is that i'm unsure how to approach this so that when I edit the individual Supplier details and click the "Supplier Prices" button that it brings back the prices relating to that supplier only. I then want to be able to add new prices within the prices screen.


I know i'll need to use the supplierid with maybe the getcurrentfield function to enable me to get my current supplier deatils, but i'm unsure how to approach this.


Can anybody point me in the right direction with how best to achieve this?


Any help will be appreciated.


Thank you


Dave


 

[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Adding a Prices table to an existing Supplier tableYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Apr 12 9:02 AM
fiogf49gjkf0d

I would store the current supplierID field from the master\calling\click the button form in a GlobalInfo variable.


Then On your detail form with the Supplier Prices data grid in the OnLoad\OnChange of the form when you refresh the grid I would add the GlobalInfo value into the SQL for the grid.....thus ensuring only that Supplier's prices are exposed in the grid.

[Reply][Quote]
Dave Cleary
Posts: 61
 
Re: Adding a Prices table to an existing Supplier tableYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 25 Apr 12 5:58 AM
fiogf49gjkf0d

Hi, thanks for the reply


I understand what I need to do and have a form1 where I have declared a Public Variable and have populated the variable with the content of a field which I have tested through a message box and it seems to be storing it okay.


My issue is when I call the other form (form2) i'm getting an error saying that the variable (form2) has not been defined. Form2 is the name of my form????


The code is shown below:


Have I defined the Public variable correctly? - Do I need the to do something different with Form1 so that Form2 can see it? as it seems to think it is a variable and not a form.


Form Name: frmAddEditSupplier


option explicit

Public varSupplierID

Sub AXFormChange(Sender)
varSupplierID=txtDCLSupplierID.Text
End Sub

'sub SupplierVariableClick(Sender)
'msgbox varSupplierID
'End Sub

Sub SupplierCommissionsClick(Sender)
Application.BasicFunctions.DoInvoke "Form","Personal:DCL Manage Supplier Commissions"
End Sub


Form Name: frmSuppCommissions



option explicit
Sub AXFormOpen(Sender)
 txtVarSupplierID.text=frmAddEditSupplier.varSupplierID

 grdSuppCommissions.SQL = "SELECT S1.DCLSUPPCOMMISSIONID, S1.DCLSUPPLIERID, S2.SUPPLIER, S1.BAND, S1.DD_AMT, S1.INCOMP_DEALS, S1.NC_PRICE, S1.RNW_PRICE, S1.NP_UPFRONT_CC, S1.NP_UPFRONT_DD FROM DCLSION S1 LEFT OUTER JOIN DCLSUPPLIER S2 ON S1.DCLSUPPLIERID=S2.DCLSUPPLIERID "
 grdSuppCommissions.Refresh
End Sub


As I said the variable is being captured from the first form(frmAddEditSupplier) but when the 2nd form is opened I get the script error:


" Variable is undefined: 'frmAddEditSupplier' "


Can anyone shed any light as to why this is falling over?


Thanks


Dave

[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Adding a Prices table to an existing Supplier tableYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 25 Apr 12 8:07 AM
fiogf49gjkf0d

I was very explicit in my instructions.....GlobalInfo variable.


 


Looks like you need to take some training in vbScripting and SLX customizations......DevLogix III is a darn good place to start.....

[Reply][Quote]
Dave Cleary
Posts: 61
 
Re: Adding a Prices table to an existing Supplier tableYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 25 Apr 12 8:38 AM
fiogf49gjkf0d

Thanks RJ


I somehow missed that point...!!


It's now working perfectly.


Thanks again.


Dave

[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Adding a Prices table to an existing Supplier tableYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 25 Apr 12 8:50 AM
fiogf49gjkf0d

Well.....we all know what coding in the morning is like.....time for another cup of Joe! Wink

[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 | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 2/23/2025 7:52:15 AM