Problem in putting validation for detail records
Hi,
I have a customer entity/ view object, and also an address entity/ view object. They are linked by an association/ view link. I need to put a chk that a customer should have at least one address. For this i created a validateCustomer method validator. In this i used the following code -
RowIterator addresses = getAddresssDtl();
if(addresses.getRowCount() <= 0)
throw new JboException(String.valueOf(addresses.getRowCount()));
else
return true;
When i test the application module (the address via customer view), i add a customer, do not commit, add an address, then place my cursor in one of the customer fields, press the commit button. The exeption is raised even though i have an address.
Please suggest a solution. Why does getAddressDtl() not take into consideration the records in the current rowset of the child?
Thanks for any help.
Aparna.
null
If you are using JDev 3.0, then you need to set the command line flag:
-Djbo.assoc.consistent=true
In JDev 3.1, this flag is set by default, so you don't have to set it.
I believe this is documented in the Release Notes.
Similar Messages
-
How can I put validation for JTextField when gotfocus and lostfocus
Hi,
How can I put validation for JTextField when gotfocus and lostfocus ?
Thanks
WilsonYou add a focusListener to the control you wish to monitor. In the focusLost() handler you do whatever, in the focusGained() handler you do whatever.
-
How to put validations for Bank Gl accounts
Dear Gurus,
I have a requirement, where i want to make Profit center mandatory for the Bank Debits only.
Can you please suggest if my below written Validation would be useful in this respect.
Please correct my coding also. As i am doing validation for first time.
My working in Validation at line item level is :
Prerequisite: BKPF-BURKS = "ABCD"
Check : BSEG-BSCHL = 40 and BSEG-HKONT = "xxxxxx" to "yyyyyy"
Message: Please enter profit center.
regards
NJPHi,
You can acheive it in 2 ways.
1. (GL account >= xxxxx AND <= yyyyy)
or
2. Create a set for GL account using t-code GS03 and use as -
GL Account in <set name>
Regards,
Sridevi -
SQL Server Mgt Studio 2008 installation problem - Key not valid for use in specified state
I'm setting up SQL Server Management Studio 2008 on my laptop. It installed fine, but failed to import a regsrver file exported from another machine. This appears to have been due to the fact that I exported the file with usernames and passwords, although I must admit that's pretty darned inconvenient if it can't be done.
Nevertheless, I exported the file again without usernames and passwords, but the new install now won't let me even see servers, let alone import any new ones.
When I start Studio, it gives me the "Key not valid for use in specified state" error. When I 'continue', I'm delivered to a screen with the 'registered servers' pane crippled. It has no contents at all and no ability to add, select, import, export. Nothing there.
How do I rectify this?
The installation is on Windows 7 Home Premium.
Thanks for any suggestions.Hi Don,
Since this issue was still not resolved even after you reinstall SQL Server 2008, I think that this issue is probably related to some corrupted files or registry keys. Please refer to the following steps to see if you can resolve this issue:
1. Close your SSMS;
2. Go to the folder %appdata%\Microsoft\Microsoft SQL Server\100\Tools\ and check if there is a Shell folder, if so, rename it to Shell-Copy;
3. Re-open your SSMS to see if the error persists.
Everytime SQL Server 2008 Management Studio starts, it will read information from this folder to retrieve and recover some data. If the information does not exists, it will recreate new ones. Please check if this helps.
Best regards,
Charles Wang
Please remember to mark the replies as answers if they help and unmark them if they provide no help
To add to Don's comment, if you are using a different account (for example, an SA account) to run SQL Server management studio then make sure to change the user profile name when you browse to "%appdata%\Microsoft\Microsoft SQL Server\100\Tools\".
I know many of us developers have multiple accounts and I usually have my SA account have logon privileges on databases not my regular AD Account.
Other than that, the reason why this fails is because MS encrypted the regsrvr file on the source computer using the source computer's ID and is therefore unable to decrypt the file on the destination computer. To me that just doesn't make sense since the
whole idea of Export and import was to move this information across computers! And that's why this works when you import without username and passwords - no more encryption/decryption. Since we use integrated windows logon (trusted_connection=true) it works
great. For the few servers that we had SQL Logons I had to manually type them in and save. But all in all, pretty painless. -
Problem with implemnting delete for each record in the report
Hello all,
I am having trouble implementing the following requirement in my application.
In the reports, in each row..I need a delete button. Only few Users( Managers/Administrators) should be able to view this button. Rest should be able to see the normal report. Also when the user clicks on delete, the record should not be actually deleted but a column named Active/Inactive should be made InActive.( The report has only records which are active).
My problem is when the user clicks on edit button, I dont want to go to another page and perform delete operation. I should be able to modify the record in the same report page. Is this possible?
It would be really great if someone can give me inputs on how to do this..
Thanks,
shravanthiSee this link for possible solution:
Coding a delete process
You will need to modify to do your "Delete"
There is also Dene's Wonderful example application that shows a similar idea, but again you will need to modify to get your "delete" status set in the rows
how to update records marked by [row selector] ?
Thank you,
Tony Miller
Webster, TX -
Alternating Background color for Detail Records
Post Author: jbecker
CA Forum: Formula
I have found other posts concerning thing similar to this but not quite the same. I have an 8.5 report that needs to have everyother record in the detail section to be a different color. The problem is that it is counting all the records not the ones that are filtered out and displayed in the details section. I have played around with the "If RecordNumber Mod 2 = 0 Then crSilver Else crNoColor" formula but it doesn't work right. I am thinking that my formula needs to be applied last but how do I accomplish that? Any and all help will be greatly appreciated. Thanks,JerryPost Author: jbecker
CA Forum: Formula
What I mean, excuse my newbiness, is the formula is in the formatting of the detail section which is being applied on the first pass. The bottom of the report shows the record count on the first pass and the report is showing about half as many. Does that make sense? So my question is, how do I use your suggestion? I am somewhat of an inexperienced user and need all the help someone can offer.
Thanks,
Jerry -
ADF BC : Problem in Inserting a Master - Detail Record
Hi,
I am new to ADF Business Components. I am into a project where i use only the ADF BC as ORM/DB Operations and for the front end I use some other framework. The Problem is.
I have two entity objects and a ViewLink between them. [Relation between "Order" to "Item" is (1 to many relation)].
[I saw many examples in forums where its explained with View Objects But here I DID NOT create any View Object. I have only Entity Objects]
(1) OrderEO [Entity Object for Order Table]
(2) ItemEO [Entity Object for Items Table]
(3) OrderItemsViewLink [A Viewlink where OrderEO.OrderId = ItemEO.OrderId]
All The Primary keys (for the "Order" and "Items" table ) are handled by Trigger+Sequence at the time of insert in DB side.
I created custom method to insert "Order" individually it worked fine.
I created custom method to insert the "Item" individually it worked fine.
But...
When I created and "Order" with some "Items" It failing to insert and throws an
Error : oracle.jbo.InvalidOwnerException: JBO-25030: Failed to find or invalidate owning entity: detail entity ItemEO, row key oracle.jbo.Key[0 ].
My Custom Method in the AppModuleImpl is like below :
public void createNewOrderWithNewItems() {
String entityName = "com.proj.entities.OrderEO";
EntityDefImpl orderDef = EntityDefImpl.findDefObject(entityName);
OrderEOImpl newOrder = (OrderEOImpl)orderDef .createInstance2(getDBTransaction(),null);
try {
// 3. Set attribute values
newOrder .setOrderStatusCode("CREATED");
RowIterator items = newOrder .getItemEO();
Row newItemRow = items .createAndInitRow(null);
items .insertRow(newItemRow );
newItemRow .setAttribute("itemDate", new Date());
newItemRow .setAttribute("itemQty", new Number(10));
// 4. Commit the transaction
getDBTransaction().commit();
} catch (SQLException e) {
e.printStackTrace();
} catch (JboException ex) {
getDBTransaction().rollback();
throw ex;
Here the "Order" is also new and related Items is also new. What I expect is to save the Order with Items in one transaction. How to achieve this. Please suggest.
Thanks
Narayan
Edited by: 817942 on Dec 3, 2010 8:16 AMRead through the blog posts which describes
why this issue occurs and how it should be resolved.
http://radio-weblogs.com/0118231/stories/2003/01/17/whyDoIGetTheInvalidownerexception.html
http://one-size-doesnt-fit-all.blogspot.com/2008/05/jbo-25030-failed-to-find-or-invalidate.html
Thanks,
Navaneeth -
Urgent: Validation For Duplicate Record
Hi,
I Have a Simple Tabular Form for Emp,
(Number Of Records Display = 10)
I'm Inserting rows like
Empno Ename Sal Deptno
1 ABC 10000 10
2 XYZ 20000 10
3 XXX 25000 10
4 YYY 30000 10
1--- Err
If I again try to insert 1 then the system should give message 1 is already exist
before I save the Transaction.
Note: This validation should be when the item validate.
Thanks In Advance
Ahmed.Hi ,
This topic is discussed and code is available somewhere in this forum , but if you cant spend time take this this will be handy, u have to call this procedure and make slight change in the procedure where it will give a error at the time of compilation , the output coloum called out will return values based on that u can know whether its a duplicate coloum, if any more doubts reply to [email protected]
PROCEDURE check_dupitem (item VARCHAR2, prod VARCHAR2, dup OUT VARCHAR2)
IS
drno NUMBER;
BEGIN
:GLOBAL.itr := 'Y';
IF :SYSTEM.cursor_record = '1' AND :SYSTEM.last_record = 'TRUE'
THEN
:GLOBAL.itr := 'N';
ELSE
drno := :SYSTEM.cursor_record;
dup := 'N';
first_record;
LOOP
IF TO_CHAR (drno) != :SYSTEM.cursor_record
THEN
/* the next line you have to change to your item */
IF item = :tixd_itemcode AND prod = NVL (:tixd_prodcode, '0')
THEN
message ('Duplicate Item! Enter a Valid Item!');
dup := 'Y';
EXIT;
END IF;
IF :SYSTEM.last_record = 'TRUE'
THEN
EXIT;
END IF;
END IF;
down;
END LOOP;
go_record (TO_CHAR (drno));
:GLOBAL.itr := 'N';
END IF;
END;
regards
Rajesh
Hi,
I Have a Simple Tabular Form for Emp,
(Number Of Records Display = 10)
I'm Inserting rows like
Empno Ename Sal Deptno
1 ABC 10000 10
2 XYZ 20000 10
3 XXX 25000 10
4 YYY 30000 10
1--- Err
If I again try to insert 1 then the system should give message 1 is already exist
before I save the Transaction.
Note: This validation should be when the item validate.
Thanks In Advance
Ahmed. -
How to create One Master - and 2 detail records region
Hi,
My requirement is to have three regions on a single page, one for master record and two for detail records.
Also, one detail record region needs to upload images (photos) to database.
Can some one tell me how to do this in APEX.
Thanks
AaliHi Aali, I have the same issue in a master detail form, I don't know how to upload images in the detail form, can you help me please.
Thanks and regards,
Wilson -
Serial records:Lot/Serial validation failed. Please check log for details
Hi,
Received error while performing Quantity On Hand Conversion at MTL_TRANSACTIONS_INTERFACE table,
"Serial records:Lot/Serial validation failed. Please check log for details."
Perfomred following steps,
1) Inserted data at MTL_TRANSACTIONS_INETRFACE table
2) Executed "INV_TXN_MANAGER_PUB.process_Transactions"
Working on Oracle EBS R12..
Inventory Items having above mentioned error are not Lot Controlled and Serial Number generation is set to "At Receipt" . Can anyone tell, what is the cause of the error and where log file is created ?Hi;
What is EBS version? Please see:
ROI Fails with WMSINB-23840:Lot/Serial Validation Failed. Please Check Log for Details [ID 352570.1]
Regard
Helios -
Validating detail records in same table..
Hi all,
I'm stuck in problem..
i've a detail table where there are 4 Dates field. First User A fills the date field A.... Then User B comes enters date field B.
now user B should filll the date field in such a way that if User A has filled like
Date Field A Date Field B
12-Apr-2010 22-Apr-2010 should be +8 days
20-Apr-2010 25-Apr-2010 should be +5 days
30-Apr-2010 05-May-2010 should be +5 days But the problem is how i validate this ? how i know that users B's cursor is on second record & that should be validated with 20-Apr-2010 Only? 12-Apr should be validated wiht 22-apr...20-apr should be with 25-apr..same goes for remaining..
Any help will be appreciate.
Regards!Thanks for the reply.
But how do user get to know that which field/record date is wrong? it'll show up an error for all the fields/records..
Do you have any idea regarding COPY,NAME_IN :SYSTEM.????? variables..? it'll be better if we'd put up validation on field itself?
Regards... -
How can we do the validation for non visible records in table control.
Hi Experts,
I have a table control which displays list of material details. I have a button to upload the material details from excel file to table control directly. I have to validate all the customers which are exist in the table. But my item (Material) table control displays only 5 rows i.e only 5 entries are visible in module pool screen. The validation is done for 5 records only in PAI event, but i need to do validation for rest of the records too (Which are not visible on items table), if validation fails then needs to display error message.
How can we do the validation for non visible records in table control.
Regards,
BujjiHi,
try validating material before displaying it in table control...'
Rgds/Abhhi -
Hi All,
I am configuring RSS Viewer webpart to SP 2013.
But i am getting an error "An unexpected error occurred processing your request. Check the logs for details and correct the problem."
I looked for solution of this error. i got to know, we need to set proxy server in web.config file.
So, in order to resolve this i put the following set of code in web.config and save the file
<system.net>
<defaultProxy>
<proxy usesystemdefault="True" proxyaddress="http://myproxyserver" bypassonlocal="True" />
</defaultProxy>
</system.net>
But, still i am getting the error.
What could be the problem now.
Any help is much appreciated.
Thanks,
RakeshHi Rakesh,
According to your description, my understanding is that you got an error when you used RSS viewer web part in SharePoint 2013.
The RSS viewer web part uses authentication delegation and is using the current user's credentials to access the proxy. However, the RSS viewer only supports anonymous and Kerberos authentication. So if you are using NTLM authentication, the RSS viewer will
not be able to authenticate the user through the proxy. More information, please refer to the link:
http://kalsing.blogspot.com/2007/11/troubleshooting-rss-viewer-web-part.html
Also see:
http://blogs.technet.com/b/sharepointdse/archive/2007/04/13/fun-with-rss.aspx
I hope this helps.
Thanks,
Wendy
Wendy Li
TechNet Community Support -
Problem in using LOV for validation-JHS 10.1.3
Hi all,
This problem was also noticed by Phil McDermott (Problem in using LOV for validation-JHS 10.1.3
I am following the demo and I noticed that the Use LOV for Validation functionality does not work on the browse page. However, it does work on the details page!
Another effect of this problem is that once you tried to validate on the browse screen, the lov button does not work anymore.
Thanks, Joep
Just found out that is does not work when entering "ph" like suggested in the tutorial. When I enter "p" and then tab to the next field, the lov popup does show.
Message was edited by:
Joep HendrixThanks for your reply Steven.
I had the same problem as Joep reported here, following the steps at:
http://www.oracle.com/technology/products/jdev/tips/muench/jhstutorial/index.html#genandrunagain
Your solution works for me.
The "completed version of the tutorial application" also has this issue:
http://otn.oracle.com/products/jdev/tips/muench/jhstutorial/MyDemo.zip
Are there any other known issues for this tutorial? Where can I find such errata list?
many thanks
Jan Vervecken -
Computation only works for FIRST record in detail table
Hi,
I am having a weird problem. I have a master/detail form with page computations that work only for the very first record inserted into the detail table. If i try to enter a second or a third record the fields DO NOT get updated with the return values.
This is driving me nuts and i am on a deadline with this project. HELP!!!!!
Here is the code for all the computations below. Interestingly enough, only the name computation works for every new detail record. The others work only for the first.
-- Calulate Social Security PL/SQL Function
DECLARE
p_is16to62ssrate NUMBER(6,2);
p_u16o62ssrate NUMBER(6,2);
p_dob DATE;
p_base_date DATE := SYSDATE;
p_age NUMBER(3);
p_totalss NUMBER(9,2);
BEGIN
SELECT is16to62ssrate, u16o62ssrate
INTO p_is16to62ssrate, p_u16o62ssrate
FROM SSC3_RATES
WHERE ratescheduleid = 1;
SELECT dob
INTO p_dob
FROM SSC3_EMPLOYEES
WHERE ssno = :P25_SSNO;
p_age := TRUNC(MONTHS_BETWEEN(p_base_date,p_dob)/12);
IF (p_age >= 16) OR (p_age <=62) THEN
p_totalss := (:P25_TOTALWAGES * (p_is16to62ssrate/100));
ELSIF (p_age < 16) OR (p_age > 62) THEN
p_totalss := (:P25_TOTALWAGES * (p_u16o62ssrate/100));
ELSE
p_totalss := 0.00;
END IF;
RETURN p_totalss;
END;
-- Calculate Levy PL/SQL Function
DECLARE
-- declare local variables to hold rates from rates table
p_hsdlarate NUMBER(6,2);
p_hsdlbrate NUMBER(6,2);
p_hsdlcrate NUMBER(6,2);
p_hsdldrate NUMBER(6,2);
p_hsdlaminearnings NUMBER(8,2);
p_hsdlamaxearnings NUMBER(8,2);
p_hsdlbminearnings NUMBER(8,2);
p_hsdlbmaxearnings NUMBER(8,2);
p_hsdlcminearnings NUMBER(8,2);
p_hsdlcmaxearnings NUMBER(8,2);
p_hsdldminearnings NUMBER(8,2);
p_hsdldmaxearnings NUMBER(8,2);
p_totalwages NUMBER(8,2);
p_totallevy NUMBER(8,2);
BEGIN
-- Load rate info from table into variables
SELECT hsdlarate, hsdlbrate, hsdlcrate, hsdldrate, hsdlaminearnings,
hsdlamaxearnings, hsdlbminearnings, hsdlbmaxearnings,
hsdlcminearnings, hsdlcmaxearnings, hsdldminearnings,
hsdldmaxearnings
INTO p_hsdlarate, p_hsdlbrate, p_hsdlcrate, p_hsdldrate,
p_hsdlaminearnings, p_hsdlamaxearnings, p_hsdlbminearnings,
p_hsdlbmaxearnings, p_hsdlcminearnings, p_hsdlcmaxearnings,
p_hsdldminearnings, p_hsdldmaxearnings
FROM SSC3_RATES
WHERE ratescheduleid = 1;
-- Assign total wages to variable
p_totalwages := :P25_TOTALWAGES;
-- Determine applicable levy payment and rate
IF (p_totalwages < p_hsdlamaxearnings) THEN
p_totallevy := (p_totalwages * (p_hsdlarate/100));
ELSIF (p_totalwages >= p_hsdlbminearnings) AND (p_totalwages <= p_hsdlbmaxearnings) THEN
p_totallevy := (p_totalwages * (p_hsdlbrate/100));
ELSIF (p_totalwages >= p_hsdlcminearnings) AND (p_totalwages <= p_hsdlcmaxearnings) THEN
p_totallevy := (p_totalwages * (p_hsdlcrate/100));
ELSIF (p_totalwages >= p_hsdldminearnings) THEN
p_totallevy := (p_totalwages * (p_hsdldrate/100));
END IF;
RETURN p_totallevy;
END;
-- Calculate Total Wages PL/SQL Function
DECLARE
t_wages NUMBER(8,2);
BEGIN
t_wages := (:P25_WEEK1_WAGE + :P25_WEEK2_WAGE + :P25_WEEK3_WAGE + :P25_WEEK4_WAGE + :P25_WEEK5_WAGE + :P25_BONUS + :P25_OTHER);
RETURN t_wages;
END;
-- Calculate Employee Name PL/SQL Function
DECLARE
p_firstname VARCHAR2(20);
p_lastname VARCHAR2(20);
p_name VARCHAR2(40);
p_join VARCHAR2(2) := ', ';
BEGIN
SELECT firstname, lastname
INTO p_firstname, p_lastname
FROM SSC3_EMPLOYEES
WHERE ssno = :P25_SSNO;
p_name := Initcap(p_lastname||p_join||p_firstname);
RETURN p_name;
END;
Regards
Glenroy SkeltonHi,
The first thing that strikes me is the following IF test:
IF (p_age >= 16) OR (p_age <=62) THEN
p_totalss := (:P25_TOTALWAGES * (p_is16to62ssrate/100));
ELSIF (p_age < 16) OR (p_age > 62) THEN
p_totalss := (:P25_TOTALWAGES * (p_u16o62ssrate/100));
ELSE
p_totalss := 0.00;
END IF;The first test will be true for every number as all numbers are greater than 16 or less than 62. I'd suggest changing the OR to an AND or use BETWEEN
Andy
Maybe you are looking for
-
iMovie won't respond. I've restarted and "forced-quit" move, but not getting a response. Any suggestions?
-
I Was using sumines iphone for few day in which i clicke my pic and some oyher data was there . So when i returend that phone i made a backup of that phone ... And i was not aware that the phone had an icloud id that was not verified and i was not kn
-
How to have a Metro app tile instead of a Desktop app tile.
Hello , i saw that when you create an app with Project Siena the tile looks like a Desktop app tile. Is there any possibility to create a real Metro Tile ( i mean in "full screen" , and not like a desktop app ) thanks.
-
Peak Detection and Display of TDMS file of 4 channels
The Peak Detection and Display sample VI in the NI Example finder is exactly what I am looking for but I would like to use a recoded TDMS file as its input. The TDMS file is a 4 channel data file. Does someone have an example code on how to do this?
-
Opening a form and displaying the first record
Any ideas on what the easiest solution would be to show the first record on a form when the form is opened? I've tried some of the ideas discussed in the FAQ section, but without success!! Thanks........GD