How can I open an editable, sendable e-mail screen

2019-08-20 22:54发布

I am trying to create an e-mail with to and from already filled in. To create the e-mail, I'm creating a graph instance of CREmailActivityMaint. Whenever I attempt to assign new objects to the CREmailActivityMaint.CurrentMessage or CREmailActivityMaint.Message objects so that I can set values, the opening page becomes uneditable and Send is hidden:

enter image description here

Also when I enter values, not all of them show. In this, I entered To, From, Subject, Summary, and Body, but Body and Summary show nothing. Also if I attempt to save, I get an error stating that the Summary, To, and Subject are blank: enter image description here

标签: acumatica
1条回答
男人必须洒脱
2楼-- · 2019-08-20 23:26
    CREmailActivityMaint graph = CreateInstance<CREmailActivityMaint>();
    graph.Message.Current = graph.Message.Insert();
    graph.Message.Current.MailTo = "other@test.com";
    graph.Message.Current.MailCc = "another@test.com";
    graph.Message.Current.MailBcc = "bcc@test.com";
    graph.Message.Current.Subject = "Subject";
    graph.Message.Current.Body = "Body";
    graph.Message.Cache.IsDirty = false;
    PXRedirectHelper.TryRedirect(graph, PXRedirectHelper.WindowMode.NewWindow);

enter image description here

查看更多
登录 后发表回答