11/27/2024 4:23:44 AM
|
|
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.
|
|
|
|
Calling a custom form from Contract Detail
Posted: 16 Feb 07 5:15 PM
|
fiogf49gjkf0d I have a custom form that I am calling from the Contract Detail form. The custom form is supposed to display the current account, address and contact information related to the contract that called it. This process was working great in version 6.2.4. Now that we have converted to version 7 service pack 1, the custom form gets called, but the account, address and contact fields are blank. I followed the code in a debugger and I can see where the parameters are valid at the time the custom form is called, but they are never received by the custom form.
It appears that something changed since version 6.2 that affected the commands I'm using. I don't remember where I got the commands below to call the custom form (maybe this isn't the best way to do it), but it WAS working.
The DetailsView.Script.InitializeForm command below passes parameters that are fields from the Contract Detail form. When the InitializeForm sub runs on my custom form, the parameters should contain the data that I need to determine what to display.
I would greatly appreciate any help or guidance that I can get! I may have been doing this completely wrong to begin with, so I'm open to all suggestions. Thanks!
Code on the Contract Detail form - called from OnClick event of a custom button added to form
sub LoadContractExtension(Sender) 'load the contract extension form related to the current account and contract Dim objMyForm Set objMyForm = application.MainViews.Add("Contract:rjlContractExtension",0,False) Call objMyForm.DetailsView.Script.InitializeForm(lveAccount.Text, txtReferenceNo.Text, chkActive.Text, pklService.Text)
objMyForm.ShowModal txtReferenceNo.SetFocus end sub
Code on the custom form Contract:rjlContractExtension
sub InitializeForm(SendAccount, SendContract, SendActive, SendServiceCode) CurrAccount = SendAccount CurrContract = SendContract CurrActive = SendActive CurrServiceCode = SendServiceCode
if CurrActive = "T" then edtActive.Text = "True" else edtActive.Text = "False" end if
edtService.Text = CurrServiceCode
ContractExtension.Caption = "Contract Extension"
call GetAddressInfo(Sender)
'initialize Change Flags CSPChangeFlag = 0
ContractExtension.Refresh
end sub
|
|
|
|
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!
|
|
|
|
|
|
|
|