Skip to content

[BUG] with left join to Phonecall, [from] and [to] values not displayed #739

Description

@richwaring-vibes

When I left join to the phonecall entity, the [from] and [to] fields of this entity don't show the data contained there (but with an inner join they do).

The following script creates test records and illustrates the hidden left join from and to values...

declare @oppname as varchar(50)
select @oppname = GETDATE()
select @oppname = 'richSqlTest '+ @oppname
select '1. new test opportunity name = ', @oppname 

insert into opportunity (name) select @oppname
select '2. made a new test opportunity'

declare @oppid as varchar(50)
select top 1 @oppid = opportunityid from opportunity where name = @oppname order by createdon desc
select '3. the new opp has this ID:', @oppid

insert into phonecall ([from],[to], subject, regardingobjectid, regardingobjectidtype)
select top 1 u.systemuserid, c.contactid, 'A test phonecall', @oppid, 'opportunity' from systemuser u, contact c
SELECT '4. made a new phonecall for that opp:', activityid [from],[to], subject, regardingobjectid, regardingobjectidtype FROM phonecall where regardingobjectid = @oppid

SELECT '5. inner join displays the from and to values', o.name, o.opportunityid, p.activityid, p.[from], p.[to]
FROM opportunity o
join phonecall p ON o.opportunityid = p.regardingobjectid
where o.opportunityid = @oppid

SELECT '6. LEFT join hides from and to values', o.name, o.opportunityid, p.activityid, p.[from], p.[to]
FROM opportunity o
LEFT join phonecall p ON o.opportunityid = p.regardingobjectid
where o.opportunityid = @oppid

Environment

  • SQL 4 CDS edition: XrmToolBox
  • @@VERSION = Microsoft Dataverse - 9.2.26013.147
    SQL 4 CDS - 10.1.1.0
    Dec 10 2025 08:59:29
    Copyright © 2020 - 2025 Mark Carrington

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions