Sage 200(UK): Difference between revisions

From Accelerator for SageCRM
(Created page with "Sage 200 UK edition installs specific tables into CRM which require an extra option being turned on To turn on 200 integration need to change setting (web.config) <add k...")
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 4: Line 4:


     <add key="UsesSage200UK" value="Y" />
     <add key="UsesSage200UK" value="Y" />
*The install will also provide this option.
*There is also an SQL script provided which is needed to be run to create the stored procedures used in the integration
Finally we must create a new field on person (we created a checkbox called 'Pers_ct_accelcreated')
[[File:Pers_ct_accelcreated.png]]
The we add this to the screen 'PersonOfficeIntNew' and we set the create script to be
  DefaultValue='Y';
  Hidden=true;
[[File:PersonOfficeIntNew.png]]
We then update the Table level script 'TLS_HideAccount_Person'
Search for the text
  // Set the Account ID (only ExecSql works).
  eWare.ExecSql('UPDATE Person SET Pers_AccountId=' + accountID + ' WHERE Pers_PersonId=' + personID);
and update this to be 
  if (Values('Pers_ct_accelcreated')!='Y')
  {
          // Set the Account ID (only ExecSql works).
          eWare.ExecSql('UPDATE Person SET Pers_AccountId=' + accountID + ' WHERE Pers_PersonId=' + personID);
  }
*Due to how Accelerator creates and updates a person record the line
  eWare.ExecSql('UPDATE Person SET Pers_AccountId=' + accountID + ' WHERE Pers_PersonId=' + personID);
causes an SQL Lock that times out. We don't need this to run as we look after this data.
----
To stop opportunities being created for non customer companies you need to add the following script to the screen “OpportunityOfficeIntNew”
Validate Script:
(text inside the ***** only)
*****
var compid = Values("oppo_primarycompanyid");
var CompRec = CRM.FindRecord("company","comp_companyid="+compid+" and comp_type='Customer'");
if(CompRec.Eof)
{
Valid=false;
ErrorStr="Cannot create opportunities for accounts of type Supplier";
}
*****
Click update and save
[[File:oppostop1.png]]
The screen should appear as
[[File:oppostop2.png]]
For any companies not of type “Customer”

Latest revision as of 16:54, 23 October 2014

Sage 200 UK edition installs specific tables into CRM which require an extra option being turned on

To turn on 200 integration need to change setting (web.config)

   <add key="UsesSage200UK" value="Y" />
  • The install will also provide this option.
  • There is also an SQL script provided which is needed to be run to create the stored procedures used in the integration

Finally we must create a new field on person (we created a checkbox called 'Pers_ct_accelcreated')

The we add this to the screen 'PersonOfficeIntNew' and we set the create script to be

 DefaultValue='Y';
 Hidden=true;


We then update the Table level script 'TLS_HideAccount_Person'

Search for the text

 // Set the Account ID (only ExecSql works).
 eWare.ExecSql('UPDATE Person SET Pers_AccountId=' + accountID + ' WHERE Pers_PersonId=' + personID);

and update this to be

 if (Values('Pers_ct_accelcreated')!='Y')
 {
         // Set the Account ID (only ExecSql works).
         eWare.ExecSql('UPDATE Person SET Pers_AccountId=' + accountID + ' WHERE Pers_PersonId=' + personID);
 }


  • Due to how Accelerator creates and updates a person record the line
 eWare.ExecSql('UPDATE Person SET Pers_AccountId=' + accountID + ' WHERE Pers_PersonId=' + personID);

causes an SQL Lock that times out. We don't need this to run as we look after this data.



To stop opportunities being created for non customer companies you need to add the following script to the screen “OpportunityOfficeIntNew”

Validate Script: (text inside the ***** only)

var compid = Values("oppo_primarycompanyid"); var CompRec = CRM.FindRecord("company","comp_companyid="+compid+" and comp_type='Customer'"); if(CompRec.Eof) { Valid=false; ErrorStr="Cannot create opportunities for accounts of type Supplier"; }

Click update and save

The screen should appear as

For any companies not of type “Customer”