I have created, a webpart in EP.
But if there is no record in the table,
i am unable to create a record through EP.
The message 'The filter that you applied did not find any matching records.'
is showing. Please help.
I think, If you have specified the Actions in NAV Emp web part then you will be able to create new records.
Because, if no any records in the table, then also, the action button will be present on the header in Sharepoint webpart. That will allow you to create new record.
I have provided Actions for the webpart.
When there is no records, the Actions are not showing.
Only the message 'The filter that you applied did not find any matching records.'
is showing.
This can be solved if we do some customization in
functions
GetLists
GetDetail
GetHeadLine
in the Codeunit 6816 (EP Read Data).
Comment the code for 'Check Number of Records'
in the above mentioned functions.
GetLists
...
...
...
// Check Number of Records
// IF NOT ErrorOccured THEN BEGIN
// IF RecordCount = 0 THEN BEGIN
// EncodeXML.AddErrors(XMLDocOutErrors,3,'','','');
// ErrorOccured := TRUE;
// END;
//END;
...
...
...
GetDetail
...
...
...
// Check Number of Records
//IF NOT ErrorOccured THEN BEGIN
// IF DetailRecordRef.COUNT = 0 THEN BEGIN
// EncodeXML.AddErrors(XMLDocOutErrors,3,'','','');
// ErrorOccured := TRUE;
// END;
//END;
...
...
...
GetHeadLine
...
...
...
// Check Number of Records
//IF NOT ErrorOccured THEN BEGIN
// IF HeadRecordRef.COUNT = 0 THEN BEGIN
// EncodeXML.AddErrors(XMLDocOutErrors,3,'','','');
// ErrorOccured := TRUE;
// END;
//END;
But, have you checked by providing the filters?
I mean if you comment that code then won't it effect to filtering process?
I think on filtering the data, it will not show the error even if it do not get any matching records.
Comments
I think, If you have specified the Actions in NAV Emp web part then you will be able to create new records.
Because, if no any records in the table, then also, the action button will be present on the header in Sharepoint webpart. That will allow you to create new record.
Ahmedabad, Gujarat, India
E Mail : ravi.thakkar@hotmail.com
I have provided Actions for the webpart.
When there is no records, the Actions are not showing.
Only the message 'The filter that you applied did not find any matching records.'
is showing.
Thanks in advance,
rikku
I had also faced the same problem.
And I think that is the biggest Employee Portal Bug.
So many bugs in NAV Emp Portal.
If you are getting any sollution then please, post it on mibuso for knowledge sharing.
Ahmedabad, Gujarat, India
E Mail : ravi.thakkar@hotmail.com
functions
GetLists
GetDetail
GetHeadLine
in the Codeunit 6816 (EP Read Data).
Comment the code for 'Check Number of Records'
in the above mentioned functions.
GetLists
...
...
...
// Check Number of Records
// IF NOT ErrorOccured THEN BEGIN
// IF RecordCount = 0 THEN BEGIN
// EncodeXML.AddErrors(XMLDocOutErrors,3,'','','');
// ErrorOccured := TRUE;
// END;
//END;
...
...
...
GetDetail
...
...
...
// Check Number of Records
//IF NOT ErrorOccured THEN BEGIN
// IF DetailRecordRef.COUNT = 0 THEN BEGIN
// EncodeXML.AddErrors(XMLDocOutErrors,3,'','','');
// ErrorOccured := TRUE;
// END;
//END;
...
...
...
GetHeadLine
...
...
...
// Check Number of Records
//IF NOT ErrorOccured THEN BEGIN
// IF HeadRecordRef.COUNT = 0 THEN BEGIN
// EncodeXML.AddErrors(XMLDocOutErrors,3,'','','');
// ErrorOccured := TRUE;
// END;
//END;
...
...
...
It's really a great sollution. =D> =D>
But, have you checked by providing the filters?
I mean if you comment that code then won't it effect to filtering process?
I think on filtering the data, it will not show the error even if it do not get any matching records.
Ahmedabad, Gujarat, India
E Mail : ravi.thakkar@hotmail.com