Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: DDMFormInstance
Hi All,
Is there any way available in Liferay 7.4 to get the "ddmFormInstance" by "Form name".
Thanks in advance:
Manoj Kumar
Well, the localized form instance name is the same as the one appearing the Forms UI, at least for my Form (called "Untitled Form"). This Groovy script (tested in the Server Administration scripting console) demonstrates the type of service call you might make:
import com.liferay.dynamic.data.mapping.service.*;
import com.liferay.dynamic.data.mapping.model.*;
import com.liferay.portal.kernel.util.*;
for (DDMFormInstance instance:DDMFormInstanceLocalServiceUtil.getDDMFormInstances(-1,-1)) {
if (instance.getName(Locale.ENGLISH)=="Untitled Form") {
out.println("Untitled Form, Instance ID: " + instance.getFormInstanceId());
}
else {
out.println("nope");
}
}
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™