Login / Register  search  syndication  about

          Kris Halsrud's Blog

Kris Halsrud on development and Integration with CRM and Development

More problems with the Opportunity to Account Asset process in the SalesLogix Web Client

Yesterday I posted information here about how, in order to set an Opportunity status to “Closed – Won” and be able to save the Opportunity that data at both the Opportunity and at the Opportunity’s Account needs to be correct.

On top of those issues there are more things that are not correct with the process of moving Opportunity Products to Account Assets.  These problems exist at the latest level (at the time of writing 7.5.4 with updates 1,2, and 3).

 

Population of Asset data is Incorrect

The process of moving the Opportunity Products to Assets is contained in the MoveOppProductsToAssets method in the Sage.SalesLogix.BusinessRules.dll.  The flow of this process is that it loops through each Opportunity Product and compares that to each Asset at the Opportunity’s Account.  If a match is found (based upon the PRODUCTID) it updates the Asset information with the information from the Opportunity.  This is a problem because the “update” is actually an “overwrite”. 

 

For instance, if you have manually added an Asset record at an Account for 10 Apple iPads and you then have an Opportunity to sell 3 Apple iPads to the same Account, once you set the Opportunity status to Closed – Won the move Oppprtunity Products to Assets method kicks off and “updates” the Account’s Asset record of Apple iPads to now say 3 instead of what it should say -13.

 

The following fields are the ones overwritten at the Asset:

 

  • Returned (sets to false)
  • ActualId (sets to the current ActualID of the Product as it exists right now)
  • Evaluation (sets to false)
  • OpportunityId (sets to the current OpportunityId that is closing)
  • Quantity (sets to the quantity at this Opportunity)
  • ProductName (sets to the current Name of the Product as it exists right now)
  • Notes (sets to the Opportunity Product’s Notes value)
  • AssetCode (blanks it out)
  • Location (blanks it out)
  • Environment (blanks it out)
  • AssetVersion (blanks it out)
  • ProductDescription (sets to the current Description of the Product as it exists right now)

 

More frustrating is that at an Opportunity you can add the same Product as multiple lines of Opportunity Products, each with different data.  The Move Opportunity Products to Assets method only works on the first record, the other rows in the opportunity are ignored.

Also at the Asset level, you can add two rows of Assets for the same Product.  If this is the case, only one of the rows gets updated, the others are ignored and not touched.

 

 

Population of Asset Data is Incomplete

One of things that the Asset creation does not do is set the ContactId field.  This is important because the standard Asset tab at the Account is designed in such a way that the grid displays the Contact name as a column.  Because of this design issue with some grids, the grid resolves to an inner join between the ACCOUNTPRODUCT and Contact tables on the CONTACTID field.  If this field is not populated in the ACCOUNTPRODUCT table it does not show up on the Asset tab!  This means that for the standard Account Asset tab, no Assets created from Opportunities will ever display in the web client. 

SELECT *
FROM (SELECT ROW_NUMBER() OVER (ORDER BY CURRENT_TIMESTAMP) as SLXRN,  child1_.ACCOUNTPRODUCTID as y0_, child1_.PRODUCTNAME as y1_,
child1_.ACTUALID as y2_, child1_.SERIALNUMBER as y3_, child1_.QUANTITY as y4_, contact2_.CONTACTID as y5_, child1_.CONTACTID as y6_,
child1_.LOCATION as y7_, child1_.ASSETCODE as y8_
FROM ACCOUNT this_ inner join ACCOUNTPRODUCT child1_ on this_.ACCOUNTID=child1_.ACCOUNTID
inner join CONTACT contact2_ on child1_.CONTACTID=contact2_.CONTACTID 
WHERE this_.ACCOUNTID = 'XXXXXXXXXXXX') query WHERE SLXRN >= 1 AND SLXRN < 11 ORDER BY SLXRN 

The SQL that the standard Account Asset tab grid is using OOTB

This is an easy fix, just set the “Data Is Optional” property of the data source on the Asset quick form to True, but this is not the case on the OOTB screen.

 

In addition to this obvious issue, the other problem is that the Product data that does display on the Asset tab is actually data stored locally in the ACCOUNTPRODUCT table and not data related to the Product record tied to the ProductID of the Asset.  This means as a user you can not tell if an Asset has a valid Product associated with it or not.  This is also the case on the edit view because in edit mode there is no visibility to to the Product link, only read only data stored in the ACCOUNTPRODUCT table.

 

Screens and rules are not compatible between LAN and Web

In the SalesLogix LAN client, using the OOTB screens, you are not required or even prompted for a Contact when adding or inserting an Asset.  In fact, it is not even on the screen.  In the web, when adding an asset it defaults the contact to the primary contact at the Account and does not let you clear it.

There are various other differences too, as shown in the following images (again comparing both OOTB screens):

SalesLogix Add Edit Asset screen LAN

 

LAN Version Plugin version number is 7, no updates have been made since that version)

 

 

SalesLogix Add Edit Asset screen Web

Web Version (754 HF1,2, and 3)

 

 

 

SalesLogix Close Opportunity Select Assets Dialog LAN

The LAN client also has a dialog when closing an Opportunity to select which products to move over.  This does not exist in the web.

When an Asset is created in the LAN client from an Opportunity, it does not update an existing Asset.  Instead it inserts a new record.  The record that is created does have the ACCOUNTPRODUCT.OPPPRODUCTID value populated and tied back to the associated Opportunity Product that created it. 

Also in the web client, whenever you update any part of an Opportunity with a Status of "Closed - Won" it updates all of the Asset records at the Account; even if no data changed about the ProductsThis is because the MoveOppProductsToAsset method is fired from the OnBeforeUpdate event of any Closed - Won Opportunity.  In the LAN client Assets are only created upon completion of the close Opportunity dialog, and only based upon the selections made on the LAN exclusive Move Products to Assets dialog shown above.

 

 

 

What's This?
  
Bookmark and Share

About Kris Halsrud

   Kris Halsrud is a Senior Analyst / Developer for Customer FX Corporation.


Related Content
   Saleslogix XBar Installation
When installing the new XBar application I found the instructions a little vague so I thought I would pas
Posted on Jul 18, 2014 by Mark Duthoy to SalesLogix Support
 
   Finding the Current Parent Record ID in SalesLogix Web
Sometimes it's the easiest things that can be a big barrier to entry for getting started with somet
Posted on Jun 27, 2014 by Ryan Farley to Ryan Farley's Blog
 
   SalesLogix 8.1 Job Service Scheduling Executions Error Resolution
Often times a web implementation will have an application server that is used to deploy the web portals t
Posted on Jun 20, 2014 by Mark Duthoy to SalesLogix Support
 
   Saleslogix 8.1 Web Access Tab Throws Null Reference Error
 I recently had a client experiencing a problem access the Contact's Web Access tab.  Whene
Posted on Jun 18, 2014 by Kris Halsrud to Kris Halsrud's Blog
 
   Debugging Custom Assemblies Using Visual Studio
Developing for Saleslogix web using external assemblies provides you with a lot of freedom when developin
Posted on Jun 10, 2014 by Jason Buss to Jason Buss' Blog
 
Comments

 

Elizabeth Berlin said:

Is there a way to disable the Move Products to Assets screen?

March 22, 2012 3:32 PM
 

Kris Halsrud said:

You can disable the launch of that screen but the issue is that the Entity OnBeforeUpdate event is really where the issue is.  The Assets will get moved whenever you save a change to an Opportunity where the Status="Closed-Won".

You could disable the base Opportunity.OnBeforeUpdate event and replace it with one of your own.

March 22, 2012 3:47 PM
 

Elizabeth Berlin said:

Thank you!

March 23, 2012 4:00 PM

Leave a Comment

(required)  
(optional)
(required)  
Add
All contents Copyright © 2014 Customer FX Corporation
Customer FX Corporation
2324 University Avenue West, Suite 115
Saint Paul, Minnesota 55114
Tel: 800.728.5783

  Follow @CustomerFX on twitter
Follow the best news, tips, and articles
  Subscribe to Customer FX on youtube
Watch SalesLogix tutorial videos from Customer FX
Login / Register