-
Notifications
You must be signed in to change notification settings - Fork 28
Example: Workflow
Magnus Gether Sørensen edited this page Jun 30, 2017
·
3 revisions
When an account is created, the name should be changed to the following format "name - name".
The following test ensures that the specification is met.
[TestMethod]
public void TestStringAdd() {
using (var context = new Xrm(orgAdminUIService)) {
var acc = new Account();
acc.Name = "WapAdd";
acc.Id = orgAdminUIService.Create(acc);
var retrieved = orgAdminUIService.Retrieve(Account.EntityLogicalName, acc.Id, new ColumnSet(true)) as Account;
Assert.AreEqual(acc.Name + " - " + acc.Name + " ", retrieved.Name);
}
}
The logic is to be implemented by a workflow. The following workflow implements that logic.
Then the MetadataGenerator is run, such that the new workflow is included in the metadata. Notice that the workflow is automatically run by XrmMockup when the account is created.
Getting started
General
Examples
Contribute