|
CRM Software - CABC | Maximizer | Maximizer Add-ons | Services | Support | Store | News |
![]() |
|
|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Member |
Hi,
I have created some user defined fields that I am updating directly into SQL. It works fine with the people that are using Maximizer locally but for the remote users those fields do not get synchronized. I am assuming this so because I am doing the update directly into SQL. Is there a way to force those field to synchronize? Thanks |
||
|
|
Master |
Apply your updates to the the SQL views, not to the underlying SQL tables.
|
|||
|
|
Member |
Hi,
I am not familiar with view, but when you open a view in the Maximizer database you don't see any data. As oppose to other database, Like Dynamics GP where you see the data when opening their view. |
|||
|
|
Member |
Would updating the "Last_modified_Date" field do the trick for MaxExchange?
|
|||
|
Maximizer Specialist![]() |
Andre,
Changing the last modified date won't make any difference I'm afraid. Max Exchange operates on the basis of Transaction Logging. Each time Maximizer updates the database it logs the transaction in the Max Exchange tables, when Max Exchange runs it goes through the tables, packages up the transactions and sends them out as compressed binary packets to the remotes. The remotes decompress them and read in the transactions. Writing data directly to the tables bypasses this transaction logging mechanic and effectively breaks the synchronisation. You must update data using the views (assuming this is Maximzer 9, 9.5 or 10). The reason you are not seeing anything when you open the view is down to security. The view respects Maximizers security, so unless you connect to the SQL Server as a valid Maximizer user you will see nothing. I would suggest you connect to the SQL Server under SQL Authentication and log in as the MASTER user (make sure you enter the password all in capital letters). This will enable you to see data in the views. |
|||
|
|
Member |
Hi,
Thanks logging in using MASTER did allowed me to see in the view. I am on Maximizer 10.0 and SQL 2005. Now when I try to update the view running the following statement update amgr_user_fields set numericCol=DynamicsSalesStat.[2008] from amgr_user_fields, amgr_client_tbl, amgr_user_field_defs_tbl, DynamicsSalesStat where amgr_user_fields.client_id=amgr_client_tbl.client_id and (amgr_user_field_defs_tbl.type_id=amgr_user_fields.type_id and amgr_user_fields.code_id='0') and amgr_client_tbl.contact_number='0' and DynamicsSalesStat.customer=amgr_client_tbl.department and amgr_user_fields.type_id='10' I am getting the following error message UPDATE is not allowed because the statement updates view "amgr_user_fields" which participates in a join and has an INSTEAD OF UPDATE trigger Thanks for your help! |
|||
|
Maximizer Specialist![]() |
Andre,
I can offer you one further tip before we go beyond what we offer for free and straight into the realms of paid consultancy. If you are trying to update a UDF (User Defined Field) in Maximizer then you need to use the view specific to that UDF. Each UDF has its own view and its through that view they can be updated. I would suggest you log into the Maximizer Administrator, make sure you are logged into the appropriate address book and then run the Address Book Verification (choose the validate and recover option) as this will ensure that a view exists for each UDF. |
|||
|
|
Member |
Hi,
The view did exist (much easier to work with) but I am still getting the same error message. update A_2008 set A_2008=DynamicsSalesStat.[2008] from A_2008, amgr_client_tbl, amgr_user_field_defs_tbl, DynamicsSalesStat where A_2008.client_id=amgr_client_tbl.client_id and DynamicsSalesStat.customer=amgr_client_tbl.department UPDATE is not allowed because the statement updates view "A_2008" which participates in a join and has an INSTEAD OF UPDATE trigger. Thanks |
|||
|
|
Member |
What happens when you try missing out the A_2008 in the from clause as you have already specified it?
update A_2008 set A_2008=DynamicsSalesStat.[2008] from update A_2008 set A_2008=DynamicsSalesStat.[2008] from amgr_client_tbl, amgr_user_field_defs_tbl, DynamicsSalesStat where A_2008.client_id=amgr_client_tbl.client_id and DynamicsSalesStat.customer=amgr_client_tbl.department |
|||
|
|
Member |
Same thing
Thanks |
|||
|
|
Master |
The error message is telling you what the problem is. The A_2008 view has an UPDATE trigger (which updates the MaxExchange transaction log) and that prevents it from being UPDATEd when it is involved in a join. You'll probably need to use some looping code similar to the following
DECLARE @Client_Id varchar(24)
DECLARE @Contact_Number int
DECLARE @sales int
DECLARE UpdateList CURSOR FORWARD_ONLY FOR
SELECT c.Client_Id, c.Contact_Number, s.[2008] AS sales
FROM AMGR_Client c INNER JOIN DynamicsSalesStat s
ON c.Department=s.customer
OPEN UpdateList
FETCH UpdateList INTO @Client_Id, @Contact_Number, @sales
WHILE @@Fetch_Status = 0 BEGIN
UPDATE A_2008 SET A_2008=@sales
WHERE Client_Id=@Client_Id
AND Contact_Number=@Contact_Number
FETCH UpdateList INTO @Client_Id, @Contact_Number, @sales
END
CLOSE UpdateList
DEALLOCATE UpdateList
|
|||
|
|
Member |
Hi,
I am going on vacation for the next two weeks. I will try that when I get back. Thanks for your time and help! |
|||
|
|
Member |
It work!
Thanks a million! |
|||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|
|
CRM Software - CABC | Maximizer | Maximizer Add-ons | Services | Support | Store | News |

