Getting Field generated Case Reference ID in CreateScript

  • Hi

    Is there a way on the New Case screen to get the generated Case_referenceid in the CreateScript for another field. 

    What I need to do is have a caption link to an external site. The link will for instance be www.testsite.com?case=1-12345

    This will have to be for all cases, new and existing.

     

    Please assist.

     

  • Nic

    The case_referenceid field is generated using a stored procedure.  See community.sagecrm.com/.../the-sage-crm-storedproc-data-type.aspx

    The new value created by this is not visible to

    CRM.GetContextInfo("cases","case_referenceid")

    Values("case_referenceid")

    of DefaultValue

    You can look at an existing cases value without difficulty, e.g.

    Valid = false;

    ErrorStr = "Case ref:"+Values("case_referenceid")+x;

    To access this you would need to use Client Side code.  Is there a reason why you have to use a Create script?  A Caption link could be easily created using code in the custom content.  And BTW it will be very very simple to do this in Sage CRM v7.2 using the new client side API.  You will see articles about that appearing very soon.