Survey answer validation in runtime
Hi all,
Does anybody how validate the survey answers values in runtime (before submitting it to the CRM database) at BAdI ORDER_SAVE?
Regards
Hello,
you've marked this question as solved. Could you describe your solution?
Regards
Gregor
Similar Messages
-
How do I save personalised survey answers in CRM
Hi experts:
In SAP Help I found this statement:
...When the recipient enters this URL in a Web browser, a survey is displayed. The recipient completes the survey and sends it (by pressing the u2018Saveu2019 button) to the companyu2019s SAP CRM system. The system then uses the answers specified in the survey to determine appropriate additional marketing activities for the original recipient of the e-mail. ...
I would like to implement this.
How exactly does the recipient send the survey to SAP CRM system? I know that PAI can create a document with survey in CRM. In this case the survey is linked to an email. I have never seen loose surveys (without document) in CRM.
Am I supposed to have an integracion with an contact of type email where the survey answers will be saved in case the marketing contact anwers the survey?
Hoping for your help.
Thanks,
CristinaHello,
First of all, I am not sure in which scenario you are using. In my earlier reply, my answer was broad too since i am not aware of which scenario you are using.
Your survey attribute might be having PAI module attached which creates/changes a lead on checking the process mode. Process calls CRM_SVY_LEAD_PAI_CREATE to create a lead.If this is not successful, it will raise the message to stop.
Therefore, You should also check if you create a lead through crmd_order Is it created error free?
one more point is: You can not use Lead survey and Lead PAI/PBO for URL.Sending an url to a business partner is a Marketing scenario hence only marketing survey and PBO/PAI should be used.
Lead survey and it's PAI/PBO should be used only when you create lead in crmd_order transaction and want to determine the relevant survey during creation.
Do you want to create lead through campaign execution or want to use Campaign automation application for the same ?
If your scenario is to send an e-mail to a business partner and as soon as he replies to the response , for each reponse you want to generate a lead.
For above scenario, you have to model the scenario in campaign Automation application.
Hope this helps.
Thanks
Raja
CRM Marketing Forum Moderator -
Show Survey Answers in assigned contact
Hello Experts,
We have a requirements that the survey answers given by respondents are shown in the Web-UI (CRM2007).
The objecttype used is BUS2000126, contact. When we check in the backend, we see the transaction with the survey filled in on the "questionnaire" tab.
On the web-UI I know there is a component ICCMP_SURVEY which we can probably use, but how to include this on the "contact" page??
Any suggestions are welcome.
Regards,
AlexHi Saumya,
Thanks for your reply, but I'm not sure if this will solve my question.
We have used campaign automation to send out e-mails with a URL to a Web-survey. When people fill in this survey, it is attached to an activity.
When we look at this activity in the backend we see the filled in survey on the questionnaire tab.
If we open the same activity in the Web-Ui however, we see all the details, but there is no assignment block for the questionnaire.
Regards,
Alex -
Including image in SharePoint survey answer and hiding elements only work on the first page
Hi All,
I would like to add some text/remove some text etc on a sharepoint survey page.
Which i have done using jquery/jscript.
But unfortunately it only works on the first page.
Any ideas how i can get it to work on all the pages?
See a sample here on how you can add the scripts:
http://sharepointkings.blogspot.com.au/2011/05/include-image-in-sharepoint-survey.html
CheersHi Patrick, does the first page use the same ASPX file as the other pages? If not, you will need to add your jquery/jscript to the other page as well.
Dimitri Ayrapetov (MCSE: SharePoint) -
Survey answers not coming back in CRM 7.0
We are about to implement CRM 7.0. I created a new survey via the web UI. I then launch a web page which brings back the survey results based on the Business Partner that logs in.
I have debugged the program and it appears that the the problem is that the CRM_MKTCA_SURVEY_MKT_PBO interface appears to be looking for a marketing attribute with a value of mktattrp_XXXXX but the web ui survey creation generated the attribute mktattr_XXXXX without the letter P. So the program to display the answers doesn't find a match because the attribute with the P doesn't match the attribute without the P.
Has anyone else experienced this issue?
Thanks
Angie.Closing this out ... this question was not answered.
-
Survey answer score extraction
I need to extract survey information to BW, but I don't want to use standard datasources because I've developed a custom table for survey results.
I've got everything except the score assigned to each answer in the Survey Suite. This is stored in XML format and I can't get to it. Any ideas? XML functions...anything?Further, if you want to use the CRM extractor and enhance the datasource structure, then try using BAdI.
To enhance CRM extractors we enhance the BDoc and then used the BADI CRM_BWA_MFLOW or CRM_BWA_SFLOW whichever is applicable to extract the data for the enhanced fields and fill the data source.
Also we go to transaction RSA6 enhance the datasource structure.
In transaction RSA6 select the datasource structure and choose the menu "Function enhancment". This goes to CMOD transaction and there the user exit "EXIT_SAPLRSAP_001" is enhanced.
Thanks
Ajai -
'file is not valid mpeg' runtime error while building
I have imported a series of files exported from Premiere Pro 2.0 into Encore, which lists them as 'do not transcode' on the project window. Running a project check doesn't find any problems, yet when I try to build the DVD, either directly to disk or to a folder on the HD, I get the above message. This happens at about 1/3rd of the process, but doesn't tell me which one of the files isn't a valid mpeg.
This is most annoying, as there are nearly 20 smallish clips in the project, if I know which file is supposed to be 'not valid' I could re-export it.
Any ideas?
Many thanksBut then would i have to re edit the dvd menu?
Casey,
You are loosing me here. If you are only replacing the Video Asset, the Menu should not figure into the equation.
The exact steps that you are using to replace that Asset in En could well hold the key. These steps can be very important.
Since you have done the Encore Project before, with other Assets, have you flushed your Media Cache in En? That would be my first step.
Now, are you trying to Import maybe a 16:9 Asset into a 4:3 En Project? That could spell trouble.
Good luck,
Hunt -
Make Survey answerable only once.
Hi,
I want my survey to be answerable only once. For that I applied note: 0001086930. When the note was applied, it was working fine. Now, we did an EHP4 upgradation. Now, when we try to apply the note, it says, it is already applied. That seems fine.
But, the issue right now is: Even if I don't do anything on the survey and just closes the window, and later if i open the survey, it is not allowing me to make any changes to the survey and a message is displayed saying, +the survey is locked+. The survey goes to display mode and so we can't use the survey anymore.
What could be the reason for this? Please do help.
Regards,
JubishHi,
Wrote one enhancement for that and solved the issue.
Regards,
Jubish -
Hi there, to anyone that can lend a hand?
I just got Captivate 3 and am playing around with it. I am
creating some learning modules to take out for presentations, cd
distribution and eventually online learning from our web site....my
question is though;
We purchased Captivate for many reasons, one of which the
online questions/surveys thinking we could gather information. Is
there anyway, if we were to use Captivate at the end of a module to
have users tell us how effective it was, can we actually get their
answers?While I agree using surveymonkey, or sites like it, to handle
surveys is
a good solution, the issue remains that there is no way to
get that data
back into the LMS user record - since the survey is outside
the LMS.
Erik
azaral wrote:
> hey, Newb, another survey resource is surveymonkey.com.
Erik Lord
http://www.capemedia.net
Adobe Community Expert - eLearning
http://www.adobe.com/communities/experts/
http://www.awaretips.net -
Authorware Tips! -
How to use multi async method in Windows Runtime Component (C#)
I want to migrate an async method into Windows Runtime Component.
CookieContainer cc = await utility.GetCookieContainer();
But the content of async method still contains async methods.
public async Task<CookieContainer> GetCookieContainer()
if (stsAuthToken != null)
if (DateTime.Now > stsAuthToken.Expires)
this.stsAuthToken = await GetMsoStsSAMLToken();
AuthCookies cookies = await GetAuthCookies(this.stsAuthToken);
CookieContainer cc = new CookieContainer();
Cookie samlAuthCookie = new Cookie("FedAuth", cookies.FedAuth)
Path = "/",
Expires = this.stsAuthToken.Expires,
Secure = cookies.Host.Scheme.Equals("https"),
HttpOnly = true,
Domain = cookies.Host.Host
cc.Add(this.spSiteUrl, samlAuthCookie);
Cookie rtFACookie = new Cookie("rtFA", cookies.RtFA)
Path = "/",
Expires = this.stsAuthToken.Expires,
Secure = cookies.Host.Scheme.Equals("https"),
HttpOnly = true,
Domain = cookies.Host.Host
cc.Add(this.spSiteUrl, rtFACookie);
this.cookieContainer = cc;
And even GetMsoStsSAMLToken and GetAuthCookies contain async methods...
How to migrate it?Hi Matt,
I'm sorry for my unclear description.
My WinRT Component is for Javascript. If I use folloiong codes, error occurs.
public static async Task<bool> GetInternal(string url, string username, string password)
bool r = await AuthUtility.Create(new Uri(url), username, password);
return r;
The error is
SharePointWindowsRuntimeComponent.Common.GetInternal(System.String, System.String, System.String)' has a parameter of type 'System.Threading.Tasks.Task<System.Boolean>' in its signature. Although this generic type is not a valid Windows Runtime type,
the type or its generic parameters implement interfaces that are valid Windows Runtime types. Consider changing the type 'Task' in the method signature to one of the following types instead: Windows.Foundation.IAsyncAction, Windows.Foundation.IAsyncOperation,
or one of the other Windows Runtime async interfaces. The standard .NET awaiter pattern also applies when consuming Windows Runtime async interfaces. Please see System.Runtime.InteropServices.WindowsRuntime.AsyncInfo for more information about converting managed
task objects to Windows Runtime async interfaces.
Some articles said, Task<T> is not WinRT type and should be converted to IAsyncOperation<T>. Only stirng, int, bool, object, array of above types and some 'simple' type can be used. (The
related article)
Then I try to convert Task<bool>, but the codes don't work.
Above is why I ask this question.
If async method can be used in WinRT component directly, please let me know why I got above error.
Thanks. -
BAPI_LEAD_CREATEMULTI - with surveys
somebody knows like enclosing a survey to lead?
use ' BAPI_LEAD_CREATEMULTI ' but does not create the document of surveys.
thanksHello. I have this same problem. We need a RFC function module where user can enter a lead description and survey answers. Then lead with filled in description and survey with filled in answers get created in CRM and linked together. I debugged crmd_bus2000108. Here is my solution( it is a little test program for now but it works ). You can determine input values for your case for FMs using debugging. Procedure:
-create lead using CRM_ORDER_MAINTAIN_MULTI_OW
-create survey and populate the data( like on evaluation tab of lead ) using object cl_crm_svy_runtime.
-link survey to existing lead using CRM_ORDER_MAINTAIN_MULTI_OW
-save lead with CRM_ORDER_SAVE
-commit changes with BAPI_TRANSACTION_COMMIT
Code:
*& Report Z_TEST_LEAD_SURVEY
REPORT z_test_lead_survey.
DATA: o_survey_runtime TYPE REF TO cl_crm_svy_runtime,
o_surveyvalues TYPE REF TO cl_crm_svy_values,
t_application_params TYPE crm_svy_api_parameter_t,
t_all_values TYPE survy_t_all_values.
DATA: survey_data TYPE string,
valuexml TYPE string,
valuexml_hex TYPE xstring.
DATA: lead_guid TYPE guid_32,
lead_id TYPE crmt_object_id,
valueguid TYPE crm_svy_db_sv_guid,
valueversion TYPE crm_svy_db_sv_vers.
DATA: s_lead_h TYPE crmt_lead_h_com,
t_lead_h TYPE crmt_lead_h_comt,
s_orderadm_h TYPE crmt_orderadm_h_com,
t_orderadm_h TYPE crmt_orderadm_h_comt,
s_field_names TYPE crmt_input_field_names,
t_field_names TYPE crmt_input_field_names_tab,
s_input_fields TYPE crmt_input_field,
t_input_fields TYPE crmt_input_field_tab,
s_objects_to_save TYPE crmt_object_guid,
t_objects_to_save TYPE crmt_object_guid_tab,
s_saved_objects TYPE crmt_return_objects_struc,
t_saved_objects TYPE crmt_return_objects,
s_survey TYPE crmt_survey_com,
t_survey TYPE crmt_survey_comt.
* CREATE LEAD
* Fill required structures
s_orderadm_h-object_id = 'BUS2000108'.
s_orderadm_h-process_type = 'ZLEA'.
s_orderadm_h-description = 'TEST LEAD - DENEB'.
APPEND s_orderadm_h TO t_orderadm_h.
s_input_fields-ref_kind = 'A'.
s_input_fields-objectname = 'LEAD_H'.
APPEND s_input_fields TO t_input_fields.
s_input_fields-ref_kind = 'A'.
s_input_fields-objectname = 'ORDERADM_H'.
*Subtable FIELD_NAMES
s_field_names-fieldname = 'DESCRIPTION'.
APPEND s_field_names TO t_field_names.
*/Subtable FIELD_NAMES
s_input_fields-field_names = t_field_names.
APPEND s_input_fields TO t_input_fields.
s_lead_h-lead_type = '0007'.
APPEND s_lead_h TO t_lead_h.
* Create lead
CALL FUNCTION 'CRM_ORDER_MAINTAIN_MULTI_OW'
EXPORTING
it_lead_h = t_lead_h
iv_collect_exceptions = ''
CHANGING
ct_orderadm_h = t_orderadm_h
ct_input_fields = t_input_fields
EXCEPTIONS
error_occurred = 1
document_locked = 2
no_change_allowed = 3
no_authority = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* Get GUID of created LEAD for later saving
READ TABLE t_orderadm_h INTO s_orderadm_h INDEX 1.
s_objects_to_save = lead_guid = s_orderadm_h-guid.
APPEND s_objects_to_save TO t_objects_to_save.
* Potrdi spremembe
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
* CREATE SURVEY SURVEY
* Create survey answers input string
CONCATENATE 'svyApplicationId=CRM_SURVEY_LEAD'
'&SurveyId=ZNEW_LEAD_FORM_SISVSAP'
'&svySurveyId=ZNEW_LEAD_FORM_SISVSAP'
'&svyVersion=0000000003'
'&SchemaVersion=1'
'&svySchemaVersion=1'
'&svyLanguage=EN'
'&conid='
'&survey/result/address/name1=Deneb Debelak'
'&survey/result/address/street=Tekstilna 17a'
'&survey/resultaddress/postalcode=4000'
'&survey/result/address/city=Kranj'
'&survey/result/address/region=Gorenjska'
'&survey/result/address/phone=041966493'
'&survey/result/address/fax=Nimam'
'&survey/result/address/email=d.debelakhotmail.com'
'&survey/result/address/uri=http://www.nimam.com'
'&survey/result/bankdetails/bankcountry=Slovenija'
'&survey/result/bankdetails/bankkey=1234'
'&survey/result/bankdetails/bankaccount=78238348238328'
'&survey/result/id_ddb164f9ec715ef1acf9001b7840a5e4/id_ddbc6515052e00f1acf9001b7840a5e4=Kr neki 1'
'&survey/result/id_ddb164f9ec715ef1acf9001b7840a5e4/id_ddbc65a01ff500f1acf9001b7840a5e4=Kr neki 2'
'&survey/result/id_ddb16f9ec715ef1acf9001b7840a5e4/id_ddbc66812b7273f1acf9001b7840a5e4=id_ddbc66872638c2f1acf9001b7840a5e4'
'&survey/result/id_ddb164f9ec715ef1acf9001b7840a5e4/id_ddb165018f99b4f1acf9001b7840a5e4=Kr neki 3'
'&survey/result/id_ddb164f9ec715ef1acf9001b7840a5e4/id_ddb1682cf66426facf9001b7840a5e4=Kr neki 4'
'&survey/result/id_ddb16650885482f1acf9001b7840a5e4/id_ddb1666f95b6daf1acf9001b7840a5e4=Kr neki 5'
'&survey/result/id_ddb16650885482f1acf9001b7840a5e4/id_ddb1671399e9c2f1acf9001b7840a5e4=Kr neki 6'
'&survey/result/id_ddb16650885482f1acf9001b7840a5e4/id_ddb166a505462f1acf9001b7840a5e4=Kr neki 7'
'&survey/result/id_ddb16650885482f1acf9001b7840a5e4/id_ddb166bcdef443f1acf9001b7840a5e4=Kr neki 8'
'&survey/result/id_ddb16650885482f1acf9001b7840a5e4/id_ddb166d6b77e3ff1acf9001b7840a5e4=Kr neki 9'
'&survey/result/id_ddb16650885482f1acf9001b7840a5e4/id_ddbd38c6829df9f1acf9001b7840a5e4=THE END'
'&onInputProcessing(SUBMIT)=Save'
INTO survey_data.
* Create survey runtime object
CREATE OBJECT o_survey_runtime
EXPORTING
i_runtime_mode = 'INBOUND'
i_application_id = 'CRM_SURVEY_LEAD'
i_survey_id = 'ZNEW_LEAD_FORM_SISVSAP'
i_survey_version = '0000000000'
i_language = 'E'
i_media_type = '01'
i_valueversion = '0000000000'
i_no_value_save = ''.
* Save survey answers
o_survey_runtime->set_values( EXPORTING i_survey_data = survey_data
IMPORTING e_valueguid = valueguid
e_valueversion = valueversion
et_application_params = t_application_params ).
* Get survey values object
o_survey_runtime->get_values( IMPORTING er_survey_values = o_surveyvalues ).
* Get XML values - filled out in previous call
o_surveyvalues->get_internal_values_xml( IMPORTING e_internal_values_xml = valuexml
e_internal_values_xml_hex = valuexml_hex ).
* LINK SURVEY WITH LEAD
* Fill required structures
CLEAR t_input_fields.
s_input_fields-ref_guid = lead_guid.
s_input_fields-ref_kind = 'A'.
s_input_fields-objectname = 'SURVEY'.
*Subtable FIELD_NAMES
CLEAR: s_field_names, t_field_names.
s_field_names-fieldname = 'EVALUATION_INFOS'.
APPEND s_field_names TO t_field_names.
s_field_names-fieldname = 'SURVEYID'.
APPEND s_field_names TO t_field_names.
s_field_names-fieldname = 'SURVEYVERSION'.
APPEND s_field_names TO t_field_names.
s_field_names-fieldname = 'VALUEGUID'.
APPEND s_field_names TO t_field_names.
s_field_names-fieldname = 'VALUEVERSION'.
APPEND s_field_names TO t_field_names.
s_field_names-fieldname = 'VALUEXML'.
APPEND s_field_names TO t_field_names.
*/Subtable FIELD_NAMES
s_input_fields-field_names = t_field_names.
APPEND s_input_fields TO t_input_fields.
s_survey-ref_guid = lead_guid.
s_survey-ref_kind = 'A'.
s_survey-surveyid = 'ZNEW_LEAD_FORM_SISVSAP'.
s_survey-surveyversion = '0000000003'.
s_survey-valueguid = valueguid.
s_survey-valueversion = valueversion.
s_survey-valuexml = valuexml_hex.
s_survey-mode = 'A'.
APPEND s_survey TO t_survey.
* Link survey to lead
CALL FUNCTION 'CRM_ORDER_MAINTAIN_MULTI_OW'
EXPORTING
it_survey = t_survey
iv_collect_exceptions = ''
CHANGING
ct_orderadm_h = t_orderadm_h
ct_input_fields = t_input_fields
EXCEPTIONS
error_occurred = 1
document_locked = 2
no_change_allowed = 3
no_authority = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* Save lead
CALL FUNCTION 'CRM_ORDER_SAVE'
EXPORTING
it_objects_to_save = t_objects_to_save
IMPORTING
et_saved_objects = t_saved_objects
EXCEPTIONS
document_not_saved = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
READ TABLE t_saved_objects INTO s_saved_objects INDEX 1.
lead_id = s_saved_objects-object_id.
* Commit work
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
* WRITE GUIDs
WRITE: 'LEAD GUID:', lead_guid, /,
'LEAD ID:', lead_id, /,
'VALUE GUID:', valueguid, /.
Revard points if usefull.
Edited by: Deneb Debelak on Dec 11, 2008 3:21 PM -
Surveys - dynamic list box option
Hi,
How can I control the entries for the answer category "Dynamic list box with single selection"?
Thanks,
Susana MessiasHello Susana,
To maintain dynamic values for a specific answer, select your survey in the Survey Suite and go to the maintenance of survey attributes (CTRL+F12). Under the tab 'Technical settings', you can maintain the 'Callback to PBO' function module, which allows you to modify the survey at runtime. (The function module you specify here is called by the survey tool runtime environment at PBO.)
As an example, you can have a look at the function module 'CRM_SVY_EXAMPLE_DYNAMIC_PBO', which contains a section to set answer options at runtime. Of course, you would have to program your own logic to meet your specific requirements for setting the values.
I hope this helps.
Kind regards,
Kristoff -
Is it possible to use a JSF Validator to perform a Dependency validation?
I'm new to JSF, but getting more and more experience everyday. I've create some custom validators for a few input fields on my form and they are working beautifully. What I can't figure out is how to write a validator that will check a field for a value based on another fields value. For instance, I would like to require a person to enter an address if they select a Yes / No select box indicating they would like to supply an address.
Does anyone know how I can do this? I've come up with a clunky work around by performing my dependency validations in my action page rather than a validator.
Thanks!!!!Hi RaymondDeCampo.
I have never been a big fan of how JSF (and even Struts)handle forms both in the front (the view) and the back.
Forcing the developer to contend with writing a java class for each thinkable form does not look like a workable pattern to me. And tying the view (JSP or JSF page) tightly to the form classes and validators is also cumbersome.
In many decent applications, the number of forms grows to more than a tiny handful and so would the number of classes that simply act as dummy data carriers.
I do not see why I should have to maintain all the accompanying classes and validators and JSP code that each form comes with. Making changes to the structure of a form (say adding new fields or removing others, or even adding whole form pages into the sequence), modifying the model of a form (like renaming fields, adding new validation rules), or changing form view (e.g. switching from a list of checkboxes to a select dropdown, changing how and where error messages are presented, supporting a new language) are just some of those things that become tedious to maintain sentrally.
No other model of building forms out there makes the named tasks any simpler, aprt from adding a new level of complexity to the simple data collection purpose of web forms. Well, except Formular. I have had Formular working in JSF and Struts although I ended up ditching the JSF way of handling forms altogether.
I prefer good and solid separation of form components as outlined by Formular. Formular is the only API out that would allow me to migrate my forms from any Java web server to another without having to rewrite a line of code. Try upgrading your Struts form to JSF or vise versa and you'll get the idea of why I dropped the more hardwired way of coding web forms.
With Formular, I have created a repository of validators (for doing my form checks). datasources (for populating lists, radios, checkboxes, and combos), and styles (for laying out my form elements). Making modifications to my repositories, I can do site-wide changes without touching my JSPs or Java classes. I can move form messages from the top of ALL my forms and place them just above the offending fields in one single style file, I can swap the markers on optional fields and use them only on required fields if the business manager wants to in a single go, I can even change validation rules that are attached to several fields in different web forms at one instance (how many hours did we save when one client wanted all buttons in the site changed to GIFs and all phone and address fields in their application and survey forms validated a little different?)
Ack! Now It looks like I'm preaching, again so I'll hold myself. -
Built in Constraint Validation before DML
I have generated Business Components from DB Tables and FK's. When I run the AM in testmode, I expected the Entity Constraints to be checked either upon item validation time or at DML time. But the framework tries to commit invalid data (e.g. child rows w/o matching parent rows) to the DB and displays the resulting Oracle Error as SQLException. Was I expecting wrong, or have Entity Constraints never been thought to be validated at runtime ? If the latter is true, is there any way to generate declarative validation logic for the EO's that reflect the Entity Constraints besides of the not null Check Constraints? I find the need to declare validation logic which matches information accessible for JDev not a task compliant with "productivity with choice".
And, what is the Key Properties meaning in the Entity Constraint Editor - Properties dialogue ?
I find it an advantage to test the constraints before performing DML, as does good old Designer generated Forms (no rolled back TX, more accurate user information possible).You can expose accessors for each end of an association. For example, say you have tables Emp and Dept. If you have an association between them (joining Emp.DeptId to Dept.Id for example) you can expose the accessors. Then, in the EmpImpl.java file you could use that accessor to get at the associated record in the Dept table. You could then check to see if there is an associated record by calling the getDept() method call in the EmpImpl.java file. I'm not sure how accurate this is, I'd have to look into it further, but it doesn't matter for me because I am commiting on every action so the cache should always be consistent with the DB (except during this transaction obviously)...
If you need more information on using this method I suggest opening a new thread specifically about it.
I used to be of the opinion that you should check everything at the application level to save trips to the Database and cut down on DB load. However, there are things that a database does much better than application code, such as catching constraint violations. As such, I do basic validations and then send it to the DB if it passes. The only problem I have with this is that by default JDevloper throws really ugly database error messages which the average user will not understand. To bypass this I found that you can override the default error messages and create a lookup for error messages where you can catch the DB errors and provide user-friendly versions. I have forgotten the steps involved, but it uses the DBTransactionFactory and other classes... I will look for the old thread I got it from later if you like... -
Steps to replicate (I suspect it can be replicated with any list, not just a survey):
1. Create a survey
2. Go to Survey Settings / Validation Settings, enter a formula and a user message.
3. Respond to a survey.
3.1. If a formula validation succeeds, a new survey response is created.
3.2. If a formula validation fails, I expect to see a user message created in step #2 above. Instead, I see an exception:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Microsoft.SharePoint.SPListDataValidationException: List data validation failed.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SPListDataValidationException: List data validation failed.]
Microsoft.SharePoint.SPListItem.AddOrUpdateItem(Boolean bAdd, Boolean bSystem, Boolean bPreserveItemVersion, Boolean bNoVersion, Boolean bMigration, Boolean bPublish, Boolean bCheckOut, Boolean bCheckin, Guid newGuidOnAdd, Int32& ulID, Object& objAttachmentNames, Object& objAttachmentContents, Boolean suppressAfterEvents, String filename) +25667234
Microsoft.SharePoint.SPListItem.UpdateInternal(Boolean bSystem, Boolean bPreserveItemVersion, Guid newGuidOnAdd, Boolean bMigration, Boolean bPublish, Boolean bNoVersion, Boolean bCheckOut, Boolean bCheckin, Boolean suppressAfterEvents, String filename) +25664366
Microsoft.SharePoint.WebControls.SaveButton.OnBubbleEvent(Object source, EventArgs e) +938
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +70
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981
Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927
Server Error in '/' Application.
List data validation failed.Look for -- <xsl:template name="dvt_1"> in your edit/new form using designer.
Place
<sharepoint:itemvalidationfailedmessage
id="checkform" ControlMode="New"
runat="server">
..right underneath<Sharepoint:ItemHiddenVersion>
ControlMode depends on what type of form you are working on. (New/Edit)
GooLuck
Maybe you are looking for
-
How do I locate another cell phone with my iphone?
how do I locate another cell phone with my iphone?
-
"One or more songs are not authorized" except they all are?
I made a play list tonight that I wanted to burn to a CD for a friend. When I went to burn it, I got an error message saying "One or more of the songs in this play list are not authorized on this computer." Apple's help page said I could figure out w
-
Passing parameter to report from form using RUN_REPORT_OBJECT method
Will you please let me know how to do this. I tried using run_product but it is giving error as too many declarations. So I decided to use RUN_REPORT_OBJECT, but no help is provided how to pass paramters to this routine from FORMS to REPORTS.
-
Okay, I have upgraded iPad and ipad2 to IOS5, how do I know my data is backed up in iCloud? Also, will both iPads be under one iTunes ID?
-
Where is the code to avoid invoice split using multiple delivery numbers
My functional consultant is asking me to debug because while trying to created invoice using the 2 deliveries are not commingling into a single invoice. Means not able to create single invoice using both delivery notes. He said, u201CThe split is ha