CRM 4.0 Calculated Fields

已答复 CRM 4.0 Calculated Fields

  • Thursday, April 24, 2008 1:01 PM
     
     
    Hello all,
                 I am doing some work within CRM and have hit a bit of a problem. Basically I need to generated a calculated value for a field with the format YYMM-###

    As far as I can see there is no calculated field type, like you get in SharePoint for example. Have I maybe missed this feature?

    From here I tried to create a workflow using the CRM interface. I asked it to update the field when a record was created. It does not seem to do this and to be honest I can see no way of actually calculating the value it is to have anyway as I actually need to reference the previous record and then update the three digit number at the end.

    If I cannot do this out the box then I assume that I am going to be diving into the SDK with Visual Studio C# to accomplish this. If this is the case then I can post on the developer forum to seek some assistance.

    Does anyone else have experience with getting calculated field values in CRM and can you perhaps point me in the correct direction. It seems to me that it is such a useful feature that I feel it must be there somewhere and that I've just missed it.

    Thanks in advance.

All Replies

  • Thursday, April 24, 2008 1:05 PM
    Owner
     
     

    JungleAnt,

     

    I think you can use JScript to calculate value, what do you want to do(more details)?

     

    Cheers,

    Jim

  • Thursday, April 24, 2008 1:12 PM
     
     
    Hi Jim,
              Appreciate the quick response. Here is a more detailed explanation as requested:

    I am further developing the opportunities section in CRM. I am creating a field called "Bid Number". This field cannot be changed by the user and is in fact a calculated field. The format of the field would be YYMM-### where YY is the year, MM is the month and ### is just an incrementing number.

    For example:
    0804-001
    0804-002
    0804-003
    0805-001
    0805-002

    This is the basic functionality that I am trying to address. My knowledge is fairly new with the CRM environment and I have not done any major development or customisations for it yet (although there is plenty time).

    If I were to use a JScript for this can you provide some resources that may help me to accomplish this.

    Many thanks.
  • Thursday, April 24, 2008 4:43 PM
    Owner
     
     Answered

    Hi JungleAnt,

     

    The YYMM is a easy part, however the ### is an incrementing number.

    So the best solution is write a pre-create callout to do the job(There is an example in SDK).

     

    Cheers,

    Jim