06-21-2013 02:05 PM
I am trying to Insert Accounts using sData.
Can create Accounts & Contacts no problem but when I set the Account or Contact Type to something like "pending" it defaults to "Customer" in SalesLogix.I even added this in type pick list of account
Any idea why this is happening? Even if I set a static value for Type within SLX it still defaults to Customer?
Thanks in advance
06-21-2013 02:24 PM
07-17-2014 05:28 PM
07-27-2014 04:38 PM
Thanks again for your reply. Could you point me in the right direction where these are? I think I'm missing something as I can't seem to find them. I've looked at business rules in application architect but nothing pointing to setting Customer as the account type.
07-28-2014 03:03 AM
I suspect the behaviour here is determined by the 'OnCreate' or 'OnAfterInsert' Events within the 'Rules' in App Architect. (so you have to go into Project Explorer, then Packages, the Saleslogix Application Entities, Account-->Rules-->Events.
You can also examin the Business rules .dll in something like .NET reflector to confirm that this is being done.
07-28-2014 04:08 PM
Thank Nathan - especially for the .net reflector tip. I've gone through the business rules dll and checked the methods for the account rules (OnCreate, OnAfterInsert etc) that are listed in the AA but still cannot see a reference to the customer type. Is the solution though to add another rule anyway to update the account type to what I want?
07-29-2014 01:12 AM
You certainly could do that - but it would leave a bit of a nagging feeling in the back of my mind if I did the same! Who knows what else might be being set, and you might even find that by inserting some OnAfterInsert logic, it still doesn't solve the problem.
When you set the value via SDATA how are you first viewing the record afterwards? is it via the SLX front-end, SData or SQL?
If via the SLX Front end - I might suspect some hidden form/picklist behaviour of setting the value on form load or something, and so would have a look at the record directly in the table to see if the Type value has been set...
07-29-2014 01:53 AM
Also, having checked the OOTB business rules, it looks to me like Type is being set OnCreate (in SLX 8.1, anyway). This of course can be overriden in the front end, so yes - some logic in the OnAfterInsert, or changing the OnCreate logic yourself....
07-29-2014 06:02 AM
If you want this to happen w/the Web client (and any/all SData clients - ex: Mobility) - Simply add a "Post Execute Step" in the "OnCreate" Event (Rule).