Hello everyone, som i'm trying to create a new record in Planned answer Session after i submit my workflow i used these code but it doesn't work
public void completed(WorkflowElementEventArgs _workflowElementEventArgs) { // TODO: Write code to execute once the workflow is completed. RecId documentRecId = _workflowElementEventArgs.parmWorkflowContext().parmRecId(); NouvelleMesureTable::updateWorkflowStatus(documentRecId, GD_WFDocumentStatus::Valide); FormControl sender; FormRun formRun; Args args = new Args(); KMVirtualNetworkAnswerTable kMVirtualNetworkAnswerTable; NouvelleMesureTable nouvelleMesureTable; FormDataSource nouvelleMesureTable_ds = sender.formRun().dataSource(formDataSourceStr(NouvelleMesureDisciplinaire,NouvelleMesureTable))as FormDataSource; ttsbegin; kMVirtualNetworkAnswerTable.ExecutedBy=nouvelleMesureTable.Person; kMVirtualNetworkAnswerTable.EvaluationOf=nouvelleMesureTable.Person; kMVirtualNetworkAnswerTable.kmCollectionId=nouvelleMesureTable.Questionnaire; ttscommit; args.name(formStr(NouvelleMesureDisciplinaire)); formRun = classFactory.formRunClass(args); formRun.init(); formRun.run(); }
thank you.