Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, August 25, 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 fields to Contacts
Long
Posts: 8
 
Adding fields to ContactsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Jul 08 6:02 AM
Hi everyone,
Newbie here to the forums & saleslogix, so please bare with me...

Well I was thinking adding new fields to contacts should be simple enough so we dont have to pay 3rd party people to do it for us.
I just wanted to add a few tick boxes & maybe a text field, how would I approach this? we're currently using 7.2 and I got architech here with me which im still messing about with. Well if someone could point me into the right direction I would really appreciate it.

Thanks in advance


[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Adding fields to ContactsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Jul 08 6:09 AM
You are correct - adding these controls is not at all difficult and, in a nutshell, you would:

(a) Click the control you want
(b) Click on the form where you want it - drag it about and don't make the ultimate mistake of not keeping the object in line (both vertical and horizontal) with other controls on the same form. It'll look like a mess otherwise.
(c) Double-click the object and find the Text (or bolded item) item - this indicates a data binding property. Click the ellipse - this will lauch the query control - find your data item and press OK.
(d) That's it !

The item will now work and data will save.

If you want to add new fields - this is a little bit more involved but can be done - in Architect, go to Database Manager, click the account table (for example) and right click/add new field - name it based on what it's going to store e.g. AccountRef, StaffQty. Define it's type (depending on what you want to store). Press the tick to commit the change.

Press F5 to refresh.

Open the form you want it to display on - and follow instructions above - this time selecting your field. Job done !
check out http://www.goodtraining.com for more lessons and examples.

Regards
Mike
[Reply][Quote]
Long
Posts: 8
 
Re: Adding fields to ContactsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Aug 08 8:09 AM
Thanks Mike,

I have another issue, i've added a new field it works perfectly. Now i want to include that field into the form where users Adds/Create a new contact/account. I made sure the control and script matches like the other fields(copy and paste named it correctly etc.) but when i create a new account and it is been succesfully added all the other details are the correct, except my custom field there's no data. Is there something that i am missing?

thanks in advance.
[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Adding fields to ContactsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Aug 08 8:21 AM
Unfortunately, this form (Ins Acc/Con) is not "databound". What this means is that you can't use the databinding method above. You need to actually alter the code to post the data. This, in itself, isn't that difficult either:

Within the Add New Contact Account form go to the Script tab.

If you adding **Account** data find:

Sub InsertNewAccount

Add a new line at the end and before the .Update:

objRS.Fields("MYDATACOLUMN").Value = CheckForNull(MyObject.Text) 'DNL

Replace above as necessary. If you are doing this for a **Contact**:

Find:


Sub InsertNewContact

And do the same as above.

Regards!
Mike
[Reply][Quote]
Long
Posts: 8
 
Re: Adding fields to ContactsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Aug 08 10:10 AM
Hi Mike, Thanks for the reply again but i did try that and it doesnt seem to work

i made sure all the syntax are correct, you can have a look here http://img156.imageshack.us/my.php?image=33yn7.png what am i doing wrong?
[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Adding fields to ContactsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Aug 08 10:28 AM
Not sure, this looks identical to what's that already ?!
[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: Adding fields to ContactsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Aug 08 7:24 PM
This should work, looks good. Suggest you put a

MsgBox pklAccRegion.txt

on the line before you set REGION, just to verify that there is data there at the point where the DB is updated.

Phil
[Reply][Quote]
Long
Posts: 8
 
Re: Adding fields to ContactsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Aug 08 4:12 AM
I'm not sure what i am doing wrong but it doesnt seem to work, the field just won't update, i verified is the correct table/field

http://img180.imageshack.us/my.php?image=35zl3.png

as you suggest Phil, i added MsgBox pklAccRegion.txt before the REGION and i get this error?

http://img366.imageshack.us/my.php?image=36ol7.png

thanks for all the help guys! i really appreciate it great community!
[Reply][Quote]
Samuel
Posts: 18
 
Re: Adding fields to ContactsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Aug 08 5:53 AM
Hi,
I don't know if that's relevant or not, but, where is your custom field? on Contact detail or Account detail?
You're talking in your first post of adding fields to the Contact detail form? And you are updating the Account's information part of the Add New C/A form?
In this case don't you need to update the Sub InsertNewContact?
Best Regards,
[Reply][Quote]
Nick McLean
Posts: 50
 
Re: Adding fields to ContactsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Aug 08 6:14 AM
Hi,

Firstly the msgbox you added should read MsgBox pklAccRegion.text not MsgBox pklAccRegion.txt - change that and release it.

The Insert looks good suggest you try the following.

1) Insert a new Account called InsertTest - make sure and fill in the region field - when you hit OK you should get a message confirming the value of the region you entered
2) Create a new Account Group with just one condition Account.Account = "InsertTest" - in the layout of the group add the region field.

When you look at the group you have created (just one row) is the region value visible.
If Yes - your insert is fine - it's the detail view thats wrong
If No - then it is indeed the insert form that's not doing it right.

Nick

[Reply][Quote]
Long
Posts: 8
 
Re: Adding fields to ContactsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Aug 08 9:26 AM
Yeah my bad it actually works fine, its the error on the Account page its self.

The Region field in the account page was set at ItemID instead of Text selected that's why it was blank, but now i changed it over it displays the code instead of the region name?
on the list view i could change the formattype to picklist and it would be fine but how can i change it here in architech?

http://img375.imageshack.us/my.php?image=38rs5.png
http://img71.imageshack.us/my.php?image=50wa0.png
[Reply][Quote]
Steve Robertson
Posts: 146
 
Re: Adding fields to ContactsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Aug 08 9:38 AM
You have saved the pick list Itemid rather than the pick list Text in the Database.

Select the correct region, save this into the database field and all should be ok.
[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): 8/25/2025 7:29:24 AM