1.Take a backup copy of this file: C:\Program Files\Sage\CRM\(your CRM name)\WWWRoot\CustomPages\Technisoft\Utilities\IntegrationFunctions.js
2.In this file edit the function GetServiceManagerEmployeePortalUrl() exactly as listed below.
function GetServiceManagerEmployeePortalUrl()
{
database=eWare.GetContextInfo('Company', 'comp_database').toUpperCase();
if (database == null || database == '')
{
database = Request.QueryString('database');
if(database == null || database == '')
{
database = ’YOUR_DEFAULT_SAGE300_DB_ID’;
}
}
filter='vm_database =\'' + database + '\'';
return eWare.FindRecord('ServiceManagerConfig',filter).vm_servicemanagerurl;
}
Be aware that in the code above these characters \'' and == '' are using TWO single quotes.
Update the above code with your default Sage 300 company database ID.
In this code the VMEP URL will be selected based on the Sage 300 ID of the current Company.
If no Company context is present (which can happen for Find, New and My Service Manager pages) it will look for the database in the CRM Menu URL otherwise a default Sage 300 database is used.