Skip to content
Snippets Groups Projects
Commit 4a67649e authored by David Büchler's avatar David Büchler
Browse files

Edit_view of CampaignParticipant_entity.aod:

Single add from contact preview: The contact field is readonly
Single add from CampaignParticipant: The contact field is editable, that a contact to add can be selected
parent 4c91ee64
No related branches found
No related tags found
No related merge requests found
......@@ -77,7 +77,6 @@
<title>Campaign Step</title>
<consumer>CampaignSteps</consumer>
<state>EDITABLE</state>
<valueProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/campaignstep_id/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/campaignstep_id/displayValueProcess.js</displayValueProcess>
<onValueChange>%aditoprj%/entity/CampaignParticipant_entity/entityfields/campaignstep_id/onValueChange.js</onValueChange>
<onValueChangeTypes>
......@@ -108,6 +107,7 @@
<consumer>AnyContacts</consumer>
<linkedContextProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/contact_id/linkedContextProcess.js</linkedContextProcess>
<state>READONLY</state>
<stateProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/contact_id/stateProcess.js</stateProcess>
<valueProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/contact_id/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/contact_id/displayValueProcess.js</displayValueProcess>
</entityField>
......
......@@ -4,5 +4,5 @@ import("Campaign_lib");
import("system.vars");
var stepId = CampaignUtils.getDefaultCampaignStep(vars.get("$field.CAMPAIGN_ID"));
logging.log("stepId -> " + stepId);
neon.setFieldValue("$field.CAMPAIGNSTEP_ID", stepId);
\ No newline at end of file
import("system.logging");
import("system.neon");
import("system.result");
import("system.vars");
logging.log("test -> " + vars.exists("$param.CampaignStepId_param"));
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW &&
vars.exists("$param.CampaignStepId_param") && vars.get("$param.CampaignStepId_param"))
{
logging.log("campaignParticipant.CAMPAIGNSTEP_ID valueProcess -> CampaignStepId_param " + vars.get("$param.CampaignStepId_param"));
result.string(vars.get("$param.CampaignStepId_param"));
}
\ No newline at end of file
import("system.result");
import("system.neon");
import("system.vars");
if(vars.exists("$param.ContactId_param") && vars.get("$param.ContactId_param"))
//A contact has been provided. Show it in readonly.
fieldState = neon.COMPONENTSTATE_READONLY;
else
//No contact has been provided, therefore let the user select one.
fieldState = neon.COMPONENTSTATE_EDITABLE;
result.string(fieldState);
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment