Skip to content

Add Record URL for activity tables should use activityid #40

@partridgetim

Description

@partridgetim

Description

The Record URL / Link column that is generated for FetchXML queries for activity type tables causes an error. The link URL uses the <logical name of the table> + "id" but it should instead use the primary id attribute.

Actual Output

= Table.AddColumn(#"Changed Type", "Link", each Dyn365CEBaseURL & "/main.aspx?etn=new_mycustomactivity&pagetype=entityrecord&id=%7b"& [new_mycustomactivityid]&"%7d")

Expected Output

= Table.AddColumn(#"Changed Type", "Link", each Dyn365CEBaseURL & "/main.aspx?etn=new_mycustomactivity&pagetype=entityrecord&id=%7b"& [activityid]&"%7d")

Resolution

Line 255 of FetchXmlQuery.cs should be updated from

#""Added Link"" = Table.AddColumn(#""Changed Type"", ""Link"", each Dyn365CEBaseURL & ""/main.aspx?etn={currentEntityMetadataWithItems.LogicalName}&pagetype=entityrecord&id=%7b""& [{currentEntityMetadataWithItems.LogicalName}id]&""%7d"")" :
@"");

to

#""Added Link"" = Table.AddColumn(#""Changed Type"", ""Link"", each Dyn365CEBaseURL & ""/main.aspx?etn={currentEntityMetadataWithItems.LogicalName}&pagetype=entityrecord&id=%7b""& [{currentEntityMetadataWithItems.PrimaryIdAttribute}]&""%7d"")" :
@"");

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