Browse By Tags

  • Blog Post: The Values() collection

    The Values() collection can be used in all serverside scripts to examine the passed in Values from a form. Create Scripts Validate Scripts Tablelevel Scripts Workflow Scripts The Values() collection must always have an argument passed to it. The Values() collection can not be examined...
  • Blog Post: Controlling the Display of Drop Down Options in Team Select Fields

    Many system entities such as Opportunities, Leads and Cases can be assigned to a Team. Custom Entities can also have Teams assigned to them. For historic reasons the Team field in the database is called channelid. user_primarychannelid oppo_channelid case_channelid lead_channelid ...
  • Blog Post: Field Level Security and Create Scripts

    The control of field level security can be found against each field listed under the Field tab in the customization area. Administration | Customization | TableName We know from the documentation that the field security interface provides a simple code-free approach for administrators to define how users...
  • Blog Post: Getting Hold of User Information in Code

    If you need to control the display of screen elements like buttons in ASP pages (or even client side in the browser screens) according to the identity of the CRM users then you will obviously need to be able to access the current user id. In ASP pages you can get hold of user information by using context...
  • Blog Post: Using a Create Script to produce an automatically incrementing number.

    This example code is provided by a colleague in Switzerland. It provides an alternative way of creating an automatically incrementing field value. The result of the code is to create an incrementing number that includes the current "year" as a prefix and then "-" plus a number that...
  • Blog Post: Using the COM CRM.CreateQueryObj() to call a Stored Procedure.

    Below is some code that illustrates how a Stored Procedure maybe invoked in the QueryObject. var strSQL = "DECLARE @@ret int"; strSQL += " EXEC @@ret=eware_get_identity_id 'notes'"; strSQL += " INSERT notes"; strSQL += " (note_noteid,note_foreigntableid,note_foreignid...
  • Blog Post: CRM.AddContent() & Dummy Field Trick

    I thought I had written about this trick before but it appears not! A customer needed a technique to allow a chart to be displayed at the top of the company screen. This is a bit like the PipeLineGraphic of the OpportunityList or CaseList system screens. The way this has been added is really...
  • Blog Post: Objects Available in the Internal COM API

    The diagram below contains the objects, methods and properties that are the main ones used in the internal COM API of Sage CRM. These objects can be used in field level scripts; Create and Validate and also in TableLevel scripts and Workflow JScript conditions. The are sometimes...
  • Blog Post: Working with a Stored Procedure that returns a result set.

    I have discussed calling Stored Procedures from within Sage CRM before in the the article " Using the COM CRM.CreateQueryObj() to call a Stored Procedure ". From that article it can be seen that it is possible to call stored procedures where ever a QueryObject can be instantiated. This could...
  • Blog Post: A Universal "Go Back" button in Workflow

    The requirement to allow the user to fall back to an earlier point in the workflow is usually handled by looping. We can see from the diagram below how a workflow can allow a user to drop back and repeat or cycle through certain workflow states again and again. But what if we need to have a workflow...