Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add empty lookup on form #87

Open
romangobrey opened this issue Mar 1, 2023 · 0 comments
Open

Add empty lookup on form #87

romangobrey opened this issue Mar 1, 2023 · 0 comments

Comments

@romangobrey
Copy link

romangobrey commented Mar 1, 2023

Hi,

I am trying to add an empty lookup on form using:
XrmMockGenerator.Attribute.createLookup("parentaccountid", null);

then I try to find it on form using:

var formContext = XrmMockGenerator.getEventContext().getFormContext();
var lookupAttribute = formContext.getAttribute("parentaccountid");
var lookupAttributeValue = lookupAttribute.getValue();

I expect null ... but it returns an empty array
I checked behavior on real Dynamics form (tried both: v8.2 and v9.2) - lookup attribute is on the form but has no value - in both (v8.2 and v9.2) formContext.getAttribute().getValue() returns null as expected
What am I missing?
Thank you!

Here is the original code for .createLookup() call from xrm-mock package
01

02

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant