Need urgent Help for fetching Mobile no.

Hello,

Using Sage CRM v7.1 while updating Person we are updating Mobile phone in Phone/Email block but while creating report for Person using vPerson i am not able to get all phone no specially Mobile and business etc.. in Column for one person if user added Businss , mobile and email so i need all 3 in different column for same person row.

  • 0

    Hi amar4all,

    This needs to be done by editing the SQL views. Phone numbers are now stored in the Phone and PhoneLink tables, so you would need to join the PhoneLink and Phone tables in your vPersonPE view 3 times in order to get a different column for each of the types of phone number.

    I hope this helps, but please let me know if you need any more help.

  • 0

    Hi,

    If this is for a report, I would personally write a new view, and leave vPersonPE to do its thing.

    As SixTicks suggests, in the view you will need to join the phone/phonelink table 3 times (or as many times as you have types of phone numbers), one for each type of number...

    Select m.plink_type,mp.phon_number,b.plink_type,bp.phon_number,pers_firstname,Pers_LastName

    From person

    LEFT JOIN PhoneLink m on m.PLink_RecordID = pers_personID AND m.plink_entityId = 13 AND m.plink_type = 'Mobile' and m.plink_deleted IS NULL

    LEFT JOIN PhoneLink b on b.PLink_RecordID = pers_personID AND b.plink_entityId = 13 AND b.plink_type = 'Business' and b.plink_deleted IS NULL

    LEFT JOIN Phone mp on m.plink_phoneId = mp.phon_phoneId AND mp.phon_deleted IS NULL

    LEFT JOIN Phone bp on b.plink_phoneId = bp.phon_phoneId and bp.phon_deleted IS NULL

    WHERE pers_deleted IS NULL


    Something like the above should get you started.