Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, August 18, 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: Inserting into SUBSCRIPTIONRULES
Brian Littlefield
Posts: 2
 
Inserting into SUBSCRIPTIONRULESYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Feb 08 11:44 PM
re: v 7.2
We need to apply fairly complex logic in designating the accounts to sync to each remote user. I am interested in programmatically creating subscription rules to achieve this but am getting stopped in populating SUBSCRIPTIONRULES.DATA - by what method can I transform the query into binary data for this column?

If there is some other method of programmatically designating the accounts to which a user is subscribed, I would appreciate any pointers to that too.

thanks
> Brian
[Reply][Quote]
Matt Dockins
Posts: 159
 
Re: Inserting into SUBSCRIPTIONRULESYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Feb 08 11:48 PM
Brian if you can list your criteria for determining the subscription rules, most of us here may be able to help come up with a better mouse trap for simplifying your logic before going down the road of trying to save your binary data in to the data field.

[Reply][Quote]
Bob (RJ)Ledger
Posts: 1103
Top 10 forum poster: 1103 posts
 
Re: Inserting into SUBSCRIPTIONRULESYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 08 Feb 08 8:01 AM
Brian,
Not a good area to go into.... there's a lot of things happening under the covers w/subscription and you will only succeed in completely trashing the system. Forget trying to do subscription by code.

You need to use the tools as provided by SalesLogix in the ADMIN. This is the only way you can build subscription correctly.

Also, the internals of SalesLogix constantly change and there is no guarentee that what you do (via code) w/subscription will continue to work.

--
RJLededger - rjlSystems
[Reply][Quote]
Brian Littlefield
Posts: 2
 
Re: Inserting into SUBSCRIPTIONRULESYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 08 Feb 08 11:01 AM
RJ: You are confirming the suspicion I had that this approach would be a bit risky…

To Matt’s question:
> we sell to physicians in the US
> we have two distinct sales teams, each having territories defined by zip codes
> a territory in sales team A will have zip codes in common with 1..n territories in sales team B
> all members of sales teams are remote users
> we need to have one contact record for each physician, but reps within both team territories corresponding to a contact record need access to this record since both sell separate product to the same physician

I have considered two approaches:
1 -- use teams
> construct a SLX team for each set of distinct shared zip codes (there will be hundreds of such teams due to asymmetry of territories between sales teams)
> assign sales reps to all SLX teams necessary to give them all their zip codes
> I am fairly sure this will work but will be messy – I envision programmatically populating SECCODE and SECCODEJOIN to do this since the definition of territories and zip relationships exist in a separate database

2 – subscription
> have all accounts owned by EVERYONE
> create and populate a SLX table defining the relationship between user and zip codes
> create a subscription template selecting all account with the user_zip table
> create/assign a subscription rule for each user (from the template) in which the userid is specified
>> this is the step I was hoping to be able to do programmatically – inserting into SUBSCRIPTIONRULES, however, since this would be a one-time step, it is practical to do manually

If anyone has other thoughts on how to tackle this, I would appreciate hearing them.

thanks
[Reply][Quote]
Matt Dockins
Posts: 159
 
Re: Inserting into SUBSCRIPTIONRULESYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 08 Feb 08 11:37 AM
I would go with approach number 2:

once you setup a small table with a userid and zipcode field to manage zip relationships, you can just add the criteria to the subscription rules as follows:

field: account.address.postalcode
operator: IN
value: (select postalcode from mytable where userid = ) and check 'use value as a literal'

It may be that you can use some form of
(select postalcode from mytable where userid = :userid)
to make it more dynamic, but I think it will balk if you try and use 'use value as a literal'

to make your life easier, you may want to do zipcodes by salesgroup then you can just have two rules
(select postalcode from mytable where salesgroup = 'A')
and
(select postalcode from mytable where salesgroup = 'B')
[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/18/2025 5:16:52 PM