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 new fields in Opportunity Screen.
Libin
Posts: 38
 
Adding new fields in Opportunity Screen.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 11 Aug 11 7:32 AM
fiogf49gjkf0d

I need to make some changes in the Opportunities screen like, I need to add two fields to enter additional data regarding the opportunity. (say, Amount funded).


For this, I assume, i need to make changes in database too, say adding two columns to an existing table.


Can someone please help me regarding this. I've been googling and searching on the development, but I couldn't find much help. It would be great, if someone give me the steps regarding this or share me a pdf to study more on development.

[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Adding new fields in Opportunity Screen.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Aug 11 10:36 PM
fiogf49gjkf0d

Open up the salesl;ogix Architect program.


 


open up the Database Manager. Scroll to the opportunity table add your two fields commit the changes to the database.


 


Open up the Plugins


form System:Opportunity Detail


 


Add an active X control for your data fields and 2 labels.....


 


Save and Release the form.

[Reply][Quote]
Libin
Posts: 38
 
Re: Adding new fields in Opportunity Screen.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 27 Aug 11 12:38 PM
fiogf49gjkf0d

Gotcha.. !! Done and successful.. Just a doubt, when i install the bundle through administrator, will it get released to everyone, or i should use the "Release plugin" to release the forms to individuals or a team?

[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Adding new fields in Opportunity Screen.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 27 Aug 11 3:51 PM
fiogf49gjkf0d

The bundle installer will ask you if you want to release the plugins.....

[Reply][Quote]
Bailey1
Posts: 57
 
Re: Adding new fields in Opportunity Screen.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Jun 12 1:58 PM
fiogf49gjkf0d

I need to add a couple of fields to the Opportunity Detail form, but these fields are on a custom table that has a 1:1 association with the account table.


How would I do this?  The user needs to be able to enter data in the field and have it update the custom table.


Thanks

[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Adding new fields in Opportunity Screen.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Jun 12 9:32 PM
fiogf49gjkf0d

Add the control. Databind the control property (usually Text property) to the 1:1 field.


 


Save the form, release to Everyone.


 


When you Insert an Opportunity, it's usually best to store the 1:1 table at the same time.

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Adding new fields in Opportunity Screen.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Jun 12 4:34 AM
fiogf49gjkf0d

You can't - the data doesn't relate to the Opp. SLX will allow you to display that - but will gray out the changeability. You'll need to have some unbound (not linked to those fields) objects on the form and deal with the display/update yourself.

[Reply][Quote]
Bailey1
Posts: 57
 
Re: Adding new fields in Opportunity Screen.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Jun 12 9:01 AM
fiogf49gjkf0d

Thanks for the reply Mike - I has a feeling it had something to do with that.  Could you give me some sample code that I could use as an example of how to do this?

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Adding new fields in Opportunity Screen.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Jun 12 9:33 AM
fiogf49gjkf0d

Here's the starting point:


' Assume strCurrOppID holds the opportunityID. obj1 & obj2 are your display/update fields
' lueAccID is the control holding the Account Name (and the ID for the account) at Opportunity Level
' aData is an array containing results of Query (1 based)


' Get the data and display it - add this part to the WhenChange of the form.


If GetFields("yourFieldA,YourFieldB","ACCOUNT_EXT","ACCOUNTID='" & lueAccID.LookupID & "'",aData) Then


obj1.Text = aData(1)
obj2.Text = aData(2)


End If


' On the WhenBeforeRecordChange of the form - write the data back from above (otherwise, it'll be lost)


    Dim objSLXDB, objRS, strSQL
    Set objSLXDB = New SLX_DB
   
       Set objRS = objSLXDB.GetNewRecordSet
       strSQL = "SELECT * FROM ACCOUNT_EXT WHERE ACCOUNTID = '" &  lueAccID.LookupID  & "'"
       objRS.Open strSQL, objSLXDB.Connection


          With objRS
                  .Fields("yourFieldA").Value = CheckForNull(obj1.Text)
                  .Fields("yourFieldB").Value = CheckForNull(obj2.Text)
                  .Update
                  .Close
          End With
       Set objRS = Nothing


 

[Reply][Quote]
Bailey1
Posts: 57
 
Re: Adding new fields in Opportunity Screen.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Jun 12 1:59 PM
fiogf49gjkf0d

Thanks so much for your help Mike.  I have it working for the most part, but I am getting an error when I open an Opportunity where my new field (ESTCLOSEVALUE) is NULL. THis field is defined on the database as type float. Here's what my code looks like in Sub AXFormChange(Sender):


If GetFields("ESTCLOSEVAL","ACCOUNT_EXT","ACCOUNTID='" & lnkAccount.LinkID & "'",aData) Then
       txtEstCloseVal.Text = CheckForNull(aData(1))
End If


The CheckForNull doesn't appear to be working here.


I then tried changing it to


 txtEstCloseVal.Text = NullToZero(aData(1))


but this will store a zero on the database when the field is updated instead of a NULL.  How do I get around this error?

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Adding new fields in Opportunity Screen.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Jun 12 5:10 PM
fiogf49gjkf0d

Easiest way is to do this:


If GetFields("IsNull(ESTCLOSEVAL,0)","ACCOUNT_EXT","ACCOUNTID='" & lnkAccount.LinkID & "'",aData) Then
txtEstCloseVal.Text = CheckForNull(aData(1))
End If


Also, if you do expect Nulls you can always get around it another way:


txtEstCloseVal.Text = aData(1) & ""


 

[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 12:02:24 PM