locked
retrieving case's contact details issue RRS feed

Answers

  • Hi

    Sorry to point this out, but your code is not supported at all. Using crm database in the custom code is not supported. The only scenario you can connect to database is if you are writing a ssrs report using filtered views.

    Now come to your problem.

    your new_resolution entity contain a caseid attribute. You may need to get the lookvalue in first query.

    if the value exist then run query to  pick up the address field from contact entity or use the existing query.

    All these changes should be made in RetrieveChequeRunCompensation function.

    I hope this helps.


    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Amreek Singh Senior CRM Consultant CDC Praxa Sydney, Australia http://mscrmshop.blogspot.com http://crm2011usersettings.codeplex.com


    • Proposed as answer by Amreek Singh Wednesday, March 21, 2012 12:37 PM
    • Marked as answer by ginger_1921 Wednesday, March 28, 2012 12:34 PM
    • Edited by Amreek Singh Wednesday, March 28, 2012 1:15 PM
    Wednesday, March 21, 2012 12:37 PM
  • write an another query before this and the result should have your custom field.

    if the value is null use or existing query otherwise instead of using c.address1_city you need to put a another inner join between filteredincident and filteredcontact

    SELECT comp.new_resolutionid, comp.new_contactid, comp.new_caseidname,
    i
    .new_cruiseidname, i.new_shipid, i.new_bookingidname,
    comp
    .new_value, comp.new_subjectidname, c.address1_name, c.address1_line1, c.address1_line2, c.address1_line3,
    c
    .address1_city, c.address1_county, c.address1_country, c.address1_postalcode, I.TicketNumber as title, s.new_initials
    from Filterednew_resolution AS comp
    INNER JOIN
    FilteredIncident i ON comp.new_caseid = i.incidentid INNER JOIN FilteredContact c ON c.contactid = i.new_thirdpartycontact
    INNER JOIN
    Filteredsystemuser AS s ON i.ownerid = s.systemuserid


    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Amreek Singh Senior CRM Consultant CDC Praxa Sydney, Australia http://mscrmshop.blogspot.com http://crm2011usersettings.codeplex.com

    • Marked as answer by ginger_1921 Wednesday, March 28, 2012 12:35 PM
    Wednesday, March 21, 2012 2:05 PM

All replies

  • Hi

    Sorry to point this out, but your code is not supported at all. Using crm database in the custom code is not supported. The only scenario you can connect to database is if you are writing a ssrs report using filtered views.

    Now come to your problem.

    your new_resolution entity contain a caseid attribute. You may need to get the lookvalue in first query.

    if the value exist then run query to  pick up the address field from contact entity or use the existing query.

    All these changes should be made in RetrieveChequeRunCompensation function.

    I hope this helps.


    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Amreek Singh Senior CRM Consultant CDC Praxa Sydney, Australia http://mscrmshop.blogspot.com http://crm2011usersettings.codeplex.com


    • Proposed as answer by Amreek Singh Wednesday, March 21, 2012 12:37 PM
    • Marked as answer by ginger_1921 Wednesday, March 28, 2012 12:34 PM
    • Edited by Amreek Singh Wednesday, March 28, 2012 1:15 PM
    Wednesday, March 21, 2012 12:37 PM
  • write an another query before this and the result should have your custom field.

    if the value is null use or existing query otherwise instead of using c.address1_city you need to put a another inner join between filteredincident and filteredcontact

    SELECT comp.new_resolutionid, comp.new_contactid, comp.new_caseidname,
    i
    .new_cruiseidname, i.new_shipid, i.new_bookingidname,
    comp
    .new_value, comp.new_subjectidname, c.address1_name, c.address1_line1, c.address1_line2, c.address1_line3,
    c
    .address1_city, c.address1_county, c.address1_country, c.address1_postalcode, I.TicketNumber as title, s.new_initials
    from Filterednew_resolution AS comp
    INNER JOIN
    FilteredIncident i ON comp.new_caseid = i.incidentid INNER JOIN FilteredContact c ON c.contactid = i.new_thirdpartycontact
    INNER JOIN
    Filteredsystemuser AS s ON i.ownerid = s.systemuserid


    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Amreek Singh Senior CRM Consultant CDC Praxa Sydney, Australia http://mscrmshop.blogspot.com http://crm2011usersettings.codeplex.com

    • Marked as answer by ginger_1921 Wednesday, March 28, 2012 12:35 PM
    Wednesday, March 21, 2012 2:05 PM
  • Retreiving data is fine however recommended method is to use filter views.

    As you want to do this on Case form therefore you can  use javascript to fetch/retreive the results based on the contact lookup.


    Regards Faisal

    Wednesday, March 21, 2012 2:06 PM