11/22/2024 2:56:40 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 general administration topics for SalesLogix (including LAN & remote topics). View the code of conduct for posting guidelines.
|
|
|
|
Realign Territories By Contact
Posted: 24 May 06 3:08 PM
|
fiogf49gjkf0d At my company we don't have Account Level security, we do our security at the contact level (I didn't set this up!) therefore we have a very hard time realigning territories. I am going to try to make an application that will mimic the Account level Realign territories and I was looking for some advice on where I might stumble.
I'm assuming changing the Seccodeid in the contact table is not enough, what other tables will I have to touch to make this work right and sync to my remotes?
Thank you! |
|
|
|
Re: Realign Territories By Contact
Posted: 01 Jun 06 8:16 AM
|
where can i buy naltrexone online buy low dose naltrexone canada mixing adderall and weed mixing xanax and weed fiogf49gjkf0d Ian,
Good luck with that ... SalesLogix is Account centric. Doable, but messy. The only help I can give you is that you can find most of the needed bypass information with the following SQL commands.
--this will give you all security check points (fields) on a global level SELECT * FROM SECTABLEDEFS WHERE FIELDNAME = 'SECCODEID'
--this will tell you who will 'pass' the security check SELECT S.ACCESSID, U.USERNAME, T.SECCODEID, T.SECCODEDESC FROM SECRIGHTS S LEFT JOIN USERINFO U ON S.ACCESSID = U.USERID LEFT JOIN SECCODE T ON S.SECCODEID = T.SECCODEID
Carla
|
|
|
|
Re: Realign Territories By Contact
Posted: 01 Jun 06 12:59 PM
|
buy sertraline uk buy sertraline uk fiogf49gjkf0d Thank you Carla!
I just got some more details on this problem and I think your input is really going to help me get it done.
The problem is that we have accounts set up for each user's territory, so if you have NY then you would have an account called a Hub that had all of the contacts for that account that are in NY. The problem comes in when we split up territories so I will have to move the contacts from one account (hub) to another account. The application that I build will replace a user going in and moving the contacts using "Move Contact" feature, do you know how that works?
Thank you! |
|
|
|
Re: Realign Territories By Contact
Posted: 01 Jun 06 2:42 PM
|
fiogf49gjkf0d Ian,
I probably have several pieces of scrap code around that you could "bend to your will", so to speak. What is your criteria for moving a contact? Contact.Address.Zipcode? Also, are Activities involved?
Carla |
|
|
| |
|
Re: Realign Territories By Contact
Posted: 01 Jun 06 3:20 PM
|
fiogf49gjkf0d We are not storing the territory information anywhere that I know of, other than Excel.
Zipcode or State are my keys, and I think we'll also want to move activities. It sounds like you've done this before! |
|
|
|
Re: Realign Territories By Contact
Posted: 01 Jun 06 3:29 PM
|
bentelan e tachipirina bentelan a cosa serve fiogf49gjkf0d Originally posted by Ian Fitzpatrick ... It sounds like you've done this before! |
|
Yup & Ugh.
Ian,
You can tackle this a couple of differnet ways, but that is going to be very dependant upon your environment. Bear with me; just a couple more questions. Are you a Synch or Non- Synch Environment. (Please say non-synch, please oh please...) Do you have 'access' to your database? i.e. Are you allowed to create views etc.? Do you use Scribe? Lastly (for time being) is this something that happens often?
C
|
|
|
|
Re: Realign Territories By Contact
Posted: 01 Jun 06 5:38 PM
|
fiogf49gjkf0d We have about 150 remote users. I can create views. I can use Scribe. and best of all.....we're on v5.2!
I've only been here about 3 weeks so I'm not sure how often we're going to have to do this, I'd assume it happens all the time.
|
|
|
|
Re: Realign Territories By Contact
Posted: 01 Jun 06 9:26 PM
|
buy misoprostol abortion pill online abortion pill ru486 buy online hk.onkyo.com fiogf49gjkf0d Wow - Saved the best for last did ya?!
Alright, given that series of information, here are a couple of options. Mix and Match /Scale to your liking. Please note: Some of this was quickly adapted from SQL scripts so it has not been tested nor was originally intended for Contact level only. But it should be enough to get you started!
From Worst to First...
Down & Dirty, Throw Away Option - Not for massive amounts of territory groupings
1.) Create View (address determination is based on your criteria) SELECT CONTACT.CONTACTID, Left(ADDRESS.POSTALCODE,5) as ZipCode, FROM CONTACT JOIN ADDRESS --either on addressid or CONTACT.CONTACTID= address.entityid AND isprimary = ‘T’)
2.) Concatenate your Zipcodes (From your Excel Sheet) into a Series Of grouped IN statements. i.e. @Concatenate (b5, "', '", c5) ... until you end up with ('zip1', 'zip2', 'zip3') Create an IN List for Each Group
3. Run Statements in ExecuteSQL (– it won’t synch if done in Query Analyzer )
Update CONTACT Set UserField1 = ‘Group1’ Modifyuser = 'ADMIN', Modifydate = GetDate() From CONTACT, myView Where CONTACT.CONTACTID = myView.CONTACTID AND myView.ZipCode IN (concatenated IN list)
UPDATE CONTACT SET ACCOUNTID = 'YouHubAccountID', Modifyuser = 'ADMIN', Modifydate = GetDate() WHERE UserField1 = 'Group1'
UPDATE CONTACT SET ACCOUNTID = 'YouNextHubAccountID', Modifyuser = 'ADMIN', Modifydate = GetDate() WHERE UserField1 = 'Group2' Etc…
UPDATE CONTACT SET accountmanagerid = Account.accountmanagerid, account = Account.account, SecCodeID = Account.SecCodeID, modifydate = getDate(), Modifyuser = 'Admin' FROM CONTACT, account WHERE CONTACT.accountid=account.accountid /* you can put additional items such as <> accountmanagerid OR <> seccodeid */
UPDATE ACTIVITY SET USERID = CONTACT.ACCOUNTMANAGERID FROM CONTACT, ACTIVITY A1 WHERE A1.ACCOUNTID=CONTACT.ACCOUNTID AND A1.USERID <> CONTACT.ACCOUNTMANAGERID -- NOTE: Review UserNotification & UserActivity> for Needed updates
Sorta Scalable, Reusable Routines - Option -
1 Create new table in SLX with TerritoryCode to Zipcode. Non Synch. Suggest AccountMgr, ZipCode, TerritoryCode (any), possible Team code if needed 2 Import Territory Schema/Data with Scribe 3 Set Up New Scribe dts with NewTerritoryTable as Source and Target is CONTACT Place TerritoryCode in CONTACT.UserField1 4 Run Above Statements (except the concatenates obviously)
More Scalable – Reusable
1 Create new table in SLX with TerritoryCode to Zipcode. Non Synch. 2 Import Territory Schema with Scribe 3 Create View (address setup to your needs ) SELECT CONTACT.CONTACTID, Left(ADDRESS.POSTALCODE,5), NewTerritoryTable.SomeTerrCode, NewTerritoryTable.Zipcode FROM CONTACT JOIN ADDRESS --either on addressid or (CONTACT.CONTACTid= address.entityid AND isprimary = ‘T’) JOIN NewTerritoryTable
4 Write a 3rd party App that connects via the SLXOLEDB And updates required fields according to criteria using the above statements
Contact me via email if you require explicit examples.
Carla
I have not failed 10,000 times, I have successfully found 10,000 ways that do not work. -- Thomas A.Edison
|
|
|
|
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!
|
|
|
|
|
|
|
|