How can I open an editable, sendable e-mail screen with prepopoulated values?

。_饼干妹妹 提交于 2020-01-06 06:09:38

问题


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:

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:


回答1:


    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);



来源:https://stackoverflow.com/questions/47250950/how-can-i-open-an-editable-sendable-e-mail-screen-with-prepopoulated-values

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!