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

Creating Acitivity Email with valid JSON syntax gets error: Invalid Recipient Type #109

Open
lucasnoordzij opened this issue Feb 3, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@lucasnoordzij
Copy link

Describe the bug

In dynamics in the Sales module I am creating a activity, Email through deep insert with JSON. When using the correct JSON format and correct data the step of creating the record from the JSON the error: OpenQA.Selenium.WebDriverException: driver encountered an error: Invalid Recipient Type is returned.

To reproduce

Steps to reproduce the behaviour.

  1. Create a json "Test Email.JSON" with the following syntax:
    {
    "@logicalName": "email",
    "@alias": "Test Email",
    "subject": "Email through JSON",
    "email_activity_parties": [
    {
    "participationtypemask": 2,
    "[email protected]": "/accounts(5700355c-0d42-ec11-8c62-6045bd8d9795)"
    },
    {
    "participationtypemask": 1,
    "[email protected]": "/systemusers(5b6c3f65-df2c-ec11-b6e5-000d3a25cb45)"
    }
    ]
    }
    replace the account GUID with a valid GUID in your environment and do the same with a user account in systemusers.

  2. create a feature file with the following scenario: ( replace names with own valid names)
    Given I am logged in to the 'Dynamics 365 — custom' app as 'a salesperson'
    When I can see the 'Leads' button I continue the test
    When I have selected the right module 'Sales' I continue the test
    Given I have created 'Test Mail'

  3. You can replace the account with a contact through this:
    "[email protected]": "/contacts(5700355c-0d42-ec11-8c62-6045bd8d9795)"

it will generate the same error (use a valid GUID from your environment of a contact)

Expected behaviour

A email acitivity record is created during the test run.

Environment (please complete the following information):

  • Test framework: NUnit
  • Browser: chrome
  • Version: 0.14.4-feat-2021-relea-0003
  • Power Apps environment version: ?

Additional context

Message: 
Test method Lighthouse.Features.Sales.CreateLeadsManuallyAfterFeature.CreateEmailThroughJSON threw exception:
OpenQA.Selenium.WebDriverException: driver encountered an error: Invalid Recipient Type

Stack Trace: 
TestDriver.ExecuteDriverFunctionAsync(String functionCall)
TestDriver.LoadTestData(String data)
DataSteps.GivenIHaveCreated(String fileName)
lambda_method(Closure , IContextManager , String )
BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) line 73
TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments, TimeSpan& duration) line 581
TestExecutionEngine.ExecuteStep(IContextManager contextManager, StepInstance stepInstance) line 494
TestExecutionEngine.OnAfterLastStep() line 210
TestRunner.CollectScenarioErrors() line 59
CreateLeadsManuallyAfterFeature.ScenarioCleanup()
CreateLeadsManuallyAfterFeature.CreateEmailThroughJSON() line 85

image

@lucasnoordzij lucasnoordzij added the bug Something isn't working label Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant