How-to Save (!!!) and Close module without prompt

Hello!

i have a script that runs through all modules of a project and adds an attribute.

The method close(module, true) always asks before closing the module, if changes shall be changed (why???).

The method close(module, false) closes the module without asking, but is not saving the changes.

What is wrong?

With best regards,
Bjoern Karpenstein

 

    for itemRef in project projectName do 
 {
  if(matches(pathToStartFrom, fullName(itemRef) ""))
  {
   shType = type(itemRef);
   print shType "\t";
 
   sItemNameFull = fullName(itemRef);
   print sItemNameFull "\t";
   
   sItemName = name(itemRef);
   print sItemName "\n"; 
   
   if(shType=="Formal")
   {
    // Reihenfolge (zuerst edit wegen Michael trigger ist schlecht!!!)
    moduleReference = read(sItemNameFull,true);
    
    current = moduleReference;
    
    // Entferne die Trigger
    Skip allTriggers = removeAndGetAllTriggerForModWithDXL(moduleReference);
    
    // Wird nicht benötigt da der Default Trigger installiert wird. 
    delete(allTriggers); 
       
    // In den Edit-Mode wechseln
    moduleReference = edit(sItemNameFull,true);
    
    modifyAttribute(moduleReference);
    
    installEditRequestTrigger(fullName moduleReference);    
    
    // Wieso fragt er trotzdem nach speichern?
    close(moduleReference, true, false);
   }
  }
 }

 


Bjoern_Karpenstein - Tue Nov 25 08:03:28 EST 2014

Re: How-to Save (!!!) and Close module without prompt
Mathias Mamsch - Tue Nov 25 08:59:21 EST 2014

Hmm ... Did you try:

save mod
close mod

Used to work for me in the past a lot of times ... Regards, Mathias

Re: How-to Save (!!!) and Close module without prompt
Bjoern_Karpenstein - Tue Nov 25 09:46:49 EST 2014

Mathias Mamsch - Tue Nov 25 08:59:21 EST 2014

Hmm ... Did you try:

save mod
close mod

Used to work for me in the past a lot of times ... Regards, Mathias

Hi Thank you that combination i left out :)