Skip to content

Commit

Permalink
Added RecordURL feature in the XRM Tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
rappen committed Sep 18, 2022
1 parent 90c249b commit 748bdde
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 9 deletions.
45 changes: 36 additions & 9 deletions XRMTokensRun/GetAttribute.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions XRMTokensRun/GetAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ private string GetResult()
{
result += "|<value>";
}
if (chkRecurdUrl.Checked)
{
result += "|<recordurl>";
}
if (!string.IsNullOrEmpty(cmbFormat.Text))
{
if (!chkValue.Checked)
Expand Down Expand Up @@ -123,6 +127,14 @@ private void chkParent_CheckedChanged(object sender, System.EventArgs e)

private void ShowResult(object sender = null, System.EventArgs e = null)
{
chkRecurdUrl.Enabled =
xrmColumn.SelectedAttribute.IsPrimaryId == true ||
(!chkParent.Checked && xrmColumn.SelectedAttribute is LookupAttributeMetadata) ||
(chkParent.Checked && xrmParentAttr.SelectedAttribute is LookupAttributeMetadata);
if (!chkRecurdUrl.Enabled)
{
chkRecurdUrl.Checked = false;
}
txtResult.Text = GetResult();
}

Expand Down

0 comments on commit 748bdde

Please sign in to comment.