Seeded Search Page ( PO History ) Addding new Criteria columns
Hi ,
I have a requirement wherein i need to customize PO History Search Page to add 2 new columns Supplier Name and Supplier Site as criteria. I was able to extend the Results VO but how do i proceed with adding new columns in the criteria region. Please provide me the steps.
also, somewhere i read in this forum if the construction mode for the query region is autocuztomization criteria then we cannot customize the seeded page. please do provide me an alternative
Thanks,
Rajesh Khatri
Hi Ramkumar,
I am doing the following steps to run the seeded page PosRevisionHistoryPG ( Under Purchasing :-
1) copied entire pos folder ( $java_top/oracle/apps/pos ) under java_top to my local machine.
So my local machine has the foll directory structure
jdev_home/myclasses/oracle/pos and jdev_home/myprojects/oracle/pos
2) added jdev_home/myclasses/oracle/pos to my classpath.
3) Created a new empty OA Project. ( name - rkposchng.jpr , default package - > rkposchng.oracle.apps.pos )
4) Created a new empty Business Component Package under rkposchng.oracle.apps.pos
5) Imported the server.xml to my project from jdevphome/myprojects/oracle/apps/pos/changeorder/server.xml
6) Imported PosRevisionHistoryPG.xml ( seeded) to my project. This file was not there under java_top. I had all PG , RN ( xml files) file
from $POS_TOP/mds/changeorder/webui and copied under jdev_home/myprojects/oracle/pos and jdev_home/myprojects/oracle/pos/changeorder/webui
7) Ran the page from jdeveloper and its not returning any rows. On running i received 71 warnings and 0 errors.
From the above you can see that i am not changing anything but still no rows are returned.
Do i need to import any more files in step 5. I am not getting any clue what is the problem.
Below are the warnings :-
Warning: Invalid value "/oracle/apps/pos/lov/webui/PosDocTypeLov" for property "External LOV" on component "DocTypeIntAdvSrch".
Warning: Invalid value "/oracle/apps/pos/lov/webui/PosOperUnitLov" for property "External LOV" on component "BusUnitIntAdvSrch".
Warning: Invalid value "/oracle/apps/pos/lov/webui/PosDocTypeLov" for property "External LOV" on component "DocTypeIntSrch".
Warning: Invalid value "/oracle/apps/pos/lov/webui/PosOperUnitLov" for property "External LOV" on component "BusUnitIntSrch".
Warning: Invalid value "/oracle/apps/pos/lov/webui/PosDocTypeLov" for property "External LOV" on component "PosDocTypeInternal".
Warning: Invalid value "/oracle/apps/pos/lov/webui/PosOperUnitLov" for property "External LOV" on component "BusUnitAdvSrch".
Warning: Invalid value "/oracle/apps/pos/lov/webui/PosDocTypeLov" for property "External LOV" on component "DocTypeAdvSrch".
Warning: Invalid value "/oracle/apps/pos/lov/webui/PosOperUnitLov" for property "External LOV" on component "BusUnitSrch".
Warning: Invalid value "/oracle/apps/pos/lov/webui/PosDocTypeLov" for property "External LOV" on component "DocTypeSrch".
Warning: Some required properties are not set on the document. Please set "Additional Text" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.productBranding.
Warning: Some required properties are not set on the document. Please set "Additional Text" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.RevDateIntAdvSrch.
Warning: Some required properties are not set on the document. Please set "Additional Text" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.OrdDateIntAdvSrch.
Warning: Some required properties are not set on the document. Please set "Prompt" or "Additional Text" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.DocTypeIntAdvSrch.
Warning: Invalid value "/oracle/apps/pos/lov/webui/PosDocTypeLov" for property "External LOV" on component "DocTypeIntAdvSrch".
Warning: Some required properties are not set on the document. Please set "Prompt" or "Additional Text" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.VendSiteIntAdvSrch.
Warning: Some required properties are not set on the document. Please set "Additional Text" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.VendSiteIntAdvLovTbl.
Warning: Some required properties are not set on the document. Please set "Additional Text" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.RevIntAdvSrch.
Warning: Some required properties are not set on the document. Please set "Prompt" or "Additional Text" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.VendIntAdvSrch.
Warning: Some required properties are not set on the document. Please set "Additional Text" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.VendIntAdvLovTbl.
Warning: Some required properties are not set on the document. Please set "Additional Text" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.RelNumIntAdvSrch.
Warning: Some required properties are not set on the document. Please set "Prompt" or "Additional Text" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PoNumIntAdvSrch.
Warning: Some required properties are not set on the document. Please set "Additional Text" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PoNumIntAdvLovTbl.
Warning: Some required properties are not set on the document. Please set "Prompt" or "Additional Text" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.BusUnitIntAdvSrch.
Warning: Invalid value "/oracle/apps/pos/lov/webui/PosOperUnitLov" for property "External LOV" on component "BusUnitIntAdvSrch".
Warning: Invalid value "/oracle/apps/pos/lov/webui/PosDocTypeLov" for property "External LOV" on component "DocTypeIntSrch".
Warning: Some required properties are not set on the document. Please set "Additional Text" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.VendSiteIntLovTbl.
Warning: Some required properties are not set on the document. Please set "Additional Text" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.VendIntLovTbl.
Warning: Some required properties are not set on the document. Please set "Additional Text" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PoNumIntLovTbl.
Warning: Invalid value "/oracle/apps/pos/lov/webui/PosOperUnitLov" for property "External LOV" on component "BusUnitIntSrch".
Warning: Some required properties are not set on the document. Please set "Width" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PosShowPoChangesInternal.
Warning: Some required properties are not set on the document. Please set "Height" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PosShowPoChangesInternal.
Warning: Some required properties are not set on the document. Please set "Additional Text" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PosCompareLastSignInt.
Warning: Some required properties are not set on the document. Please set "Width" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PosCompareLastSignInt.
Warning: Some required properties are not set on the document. Please set "Height" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PosCompareLastSignInt.
Warning: Some required properties are not set on the document. Please set "Width" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PosComparePrevPoInternal.
Warning: Some required properties are not set on the document. Please set "Height" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PosComparePrevPoInternal.
Warning: Some required properties are not set on the document. Please set "Width" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PosCompareOrigPoInternal.
Warning: Some required properties are not set on the document. Please set "Height" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PosCompareOrigPoInternal.
Warning: Invalid value "/oracle/apps/pos/lov/webui/PosDocTypeLov" for property "External LOV" on component "PosDocTypeInternal".
Warning: Some required properties are not set on the document. Please set "Additional Text" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PosInternalVendorSiteLovTable.
Warning: Some required properties are not set on the document. Please set "Additional Text" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PosInternalVendorLovTable.
Warning: Some required properties are not set on the document. Please set "Additional Text" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PosInternalPONumLovTable.
Warning: For search region "/oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.RevHisIntAdvSrch", the search does not have any required search criteria, and blind queries are not allowed. Please ensure that the underlying query is performant, or designate at least one search criteria item as "Selective Search Criteria" or the "Required" property is set to yes.
Warning: For search region "/oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.RevHisIntSimSrchM", the search does not have any required search criteria, and blind queries are not allowed. Please ensure that the underlying query is performant, or designate at least one search criteria item as "Selective Search Criteria" or the "Required" property is set to yes.
Warning: The "advancedSearchPanel" under "/oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PosQueryRegContInternalRN" has a "advancedSearch" region directly under it. The "advancedSearch" region should be moved inside a "header" region under a "advancedSearchPanel".
Warning: The "simpleSearchPanel" under "/oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PosQueryRegContInternalRN" has a "messageComponentLayout" region directly under it. The "messageComponentLayout" region should be moved inside a "header" region under a "simpleSearchPanel".
Warning: Some required properties are not set on the document. Please set "Prompt" or "Additional Text" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.BusUnitAdvSrch.
Warning: Invalid value "/oracle/apps/pos/lov/webui/PosOperUnitLov" for property "External LOV" on component "BusUnitAdvSrch".
Warning: Some required properties are not set on the document. Please set "Additional Text" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.RevDateAdvSrch.
Warning: Some required properties are not set on the document. Please set "Additional Text" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.OrdDateAdvSrch.
Warning: Some required properties are not set on the document. Please set "Prompt" or "Additional Text" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.DocTypeAdvSrch.
Warning: Invalid value "/oracle/apps/pos/lov/webui/PosDocTypeLov" for property "External LOV" on component "DocTypeAdvSrch".
Warning: Some required properties are not set on the document. Please set "Additional Text" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.RevAdvSrch.
Warning: Some required properties are not set on the document. Please set "Additional Text" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.RelNumAdvSrch.
Warning: Some required properties are not set on the document. Please set "Additional Text" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PoNumAdvSrch.
Warning: Invalid value "/oracle/apps/pos/lov/webui/PosOperUnitLov" for property "External LOV" on component "BusUnitSrch".
Warning: Invalid value "/oracle/apps/pos/lov/webui/PosDocTypeLov" for property "External LOV" on component "DocTypeSrch".
Warning: Some required properties are not set on the document. Please set "Width" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PosShowPoChanges.
Warning: Some required properties are not set on the document. Please set "Height" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PosShowPoChanges.
Warning: Some required properties are not set on the document. Please set "Additional Text" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PosCompareLastSign.
Warning: Some required properties are not set on the document. Please set "Width" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PosCompareLastSign.
Warning: Some required properties are not set on the document. Please set "Height" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PosCompareLastSign.
Warning: Some required properties are not set on the document. Please set "Width" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PosComparePrevPo.
Warning: Some required properties are not set on the document. Please set "Height" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PosComparePrevPo.
Warning: Some required properties are not set on the document. Please set "Width" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PosCompareOrigPo.
Warning: Some required properties are not set on the document. Please set "Height" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PosCompareOrigPo.
Warning: For search region "/oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.RevHisAdvSrch", the search does not have any required search criteria, and blind queries are not allowed. Please ensure that the underlying query is performant, or designate at least one search criteria item as "Selective Search Criteria" or the "Required" property is set to yes.
Warning: For search region "/oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.RevHisSimSrchM", the search does not have any required search criteria, and blind queries are not allowed. Please ensure that the underlying query is performant, or designate at least one search criteria item as "Selective Search Criteria" or the "Required" property is set to yes.
Warning: The "advancedSearchPanel" under "/oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PosQueryRegContRN" has a "advancedSearch" region directly under it. The "advancedSearch" region should be moved inside a "header" region under a "advancedSearchPanel".
Warning: The "simpleSearchPanel" under "/oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PosQueryRegContRN" has a "messageComponentLayout" region directly under it. The "messageComponentLayout" region should be moved inside a "header" region under a "simpleSearchPanel".
Warning: Some required properties are not set on the document. Please set "View Instance" on component /oracle/apps/pos/changeorder/webui/PosRevisionHistoryPG.PosRevHistExport.
Thanks,
Rajesh Khatri
Similar Messages
-
In Advanced search Page, How to add custom column under property restrictions?
Hi,
The Navigation control can be added into your HTML page in the Snippet Gallery:
The two links below about how to create HTML master page and adding snippets needed into it for your reference:
http://borderingdotnet.blogspot.jp/2012/12/how-to-create-html-masterpage-for.html
http://msdn.microsoft.com/en-us/library/office/jj822370(v=office.15).aspx
Feel free to reply if there still any question.
Best regards,
Patrick
Patrick Liang
TechNet Community Support -
I want my new TAB to open blank,but have installed a s/w which opens it's own search page when i open new tab??Help appreciated
Software? See if you can get it removed with some anti-malware tools. Spybot, AVG, Kapersky, et cetera...
If you know the name of the program, you could search the registry for any instance of that name and --be CAREFUL--delete them.
And I have to ask: Did you go back to Firefox after uninstalling this program and reset the "when I open a new tab..." setting? What about your home page? -
How can I add new row/column into existing jTable?
Hi add!
Can you help me how can I add new row/column into existing jTable?
Tnx in adv!e.g
Create two buttons inside the Table ( "Add New Row" ) and ("Add new Column")
their handlers are:
add new row:
//i supose u already have
DefaultTabelModel tablemodel = new DefaultTableModel(rowdata, columnNames);
//and
JTabel jtable = new JTable(tablemodel);
// Handler (row)
jbtAddRow.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e) {
if(jtable.getSelectedRow() >= 0 )
tablemodel.insertRow(jtable.getSelectedRow(), new java.util.Vector());
else
tablemodel.addRow(new java.util.Vector());
});to add new columns its the same but inside actionPerformed method:
ask for e.g "Whats the name for the new column"
then,
tablemodel.addColumn(nameOfColumn, new java.util.Vector()); Joao
Message was edited by:
Java__Estudante -
How to add new criteria in simple search region ?
Hi,
I have been trying to add a new criteria for simple search in a seeded oaf page and facing some issue. I have successfully created the criteria field but unable to filter the search using the new criteria item. Kindly help so that i can proceed.
Thanks,Hi,
I have been trying to add a new criteria for simple search in a seeded oaf page and facing some issue. I have successfully created the criteria field but unable to filter the search using the new criteria item. Kindly help so that i can proceed.
Thanks, -
I have a list which has a underlying infopath form for insert and edit a record.
The list has various views spread across different pages .
Now depending on different pages "New Item", a value for the form will have a corresponding value.
If there is a single line of text control in the list, and depending ona page name, the value for the single line text should be autofilled when Add new item is clicked.
How do i achieve that?
Thanks...Hi,
According to your description, there are several list views in your list, there is a textbox control which holds the “Single Line of Text” type of data in your custom
form. When users click the “Add new item” button in one of the existing list views, you want the textbox control in the custom form to be populated automatically.
By default, when user clicks the “Add new item” button in a list view, the URL of the custom form page will contain the name of that list view page, thus, a workaround
which requires custom code can be like this:
After the form page loaded, we can extract the name of the list view page from the URL, then populate it into the textbox control immediately. This can be achieved
using jQuery.
About how to
get URL parameters of current page using jQuery:
http://www.jquerybyexample.net/2012/06/get-url-parameters-using-jquery.html
About
adding jQuery into InfoPath form:
http://riteshudupak.blogspot.com/2010/09/add-jquery-to-browser-enabled-infopath.html
Best regards,
Patrick
Patrick Liang
TechNet Community Support -
Help required to customize Simple/Advanced Search. Need to add new fields
Hello,
Module: Oracle Sales Online
EBS version: 12.1.3
Jdev version: 10.1.3.3
Scenario:
- We are dealing with standard oracle pages.
- We have TWO "SIMPLE/ADVANCED SEARCH"s available. Each "Simple/Advanced Search" can be found by navigating through paths "A --> B" and "A --> B --> C --> D" . Here it means one "SIMPLE/ADVANCED SEARCH" page is available at page "B" and another "SIMPLE/ADVANCED SEARCH" is available at page "D".
- In the first search page which is at page "B", both Simple as well as Advanced search has a filter field "Win Probability %", of type VARCHAR2/DROPDOWN with values (10, >=10, <=30, 30, >=30, <=50, 50, >=50, <=70, 70, >=70, <=90, 90, 100)
- In second search page, referring to page "D", the Simple search DOESN'T have the "Win Probability %". And the Advanced Search page has the "Win Probability %" but it is of type - NUMBER/MessageTextInput type.
Issue/Requirement:
- The 2nd Simple/Advanced search pages need to have "WIN PROBABILITY %" field and it should be of VARCHAR2/DROPDOWN with values (10, >=10, <=30, 30, >=30, <=50, 50, >=50, <=70, 70, >=70, <=90, 90, 100) just like the way we had in 1st Simple/Advanced search.
Note:
- Again speaking we are dealing with standard oracle pages
- If you go to the "About this Page", interestingly I found:
i. The "message component layout" for both of them is from the same region , i.e., ASNOpptympSrchRN
ii. Rest of the search filters for both the searchs are from common View Object , i.e., OpptySearchVO1 (for Simple search), OpportunityDetailsVO1 (for advanced search)
iii. The "Stack layout" for both the search pages are same, i.e. XXMASOpptyQryCO
iv. None of the fields are rendered to false (everything is set to be rendered TRUE)
Any response is highly appreciated.
Thanks,
Anand
Edited by: 933590 on Jul 19, 2012 8:18 AM"XXMASOpptyQryCO is the name of stacklayout or CO?
What is the CO?
Does both pages share same CO?
have you already extended the CO "XXMASOpptyQryCO"?
what is the original CO then? I think in that CO it must be written somewhere, simple search "search allowed = false""
-Here CO what you are referring is a controller.
-FYI pages share same controller.
-And the original controller for both the pages are OpptyUwqCO. Right now its extended controller is XXMASOpptyQryCO
Fact is I didn't create this search page. It was built by some third party members. Also that I do not have the original source nor the documentation pertaining to it. So could you inform as in how should I navigate to the point "Search Allowed = True"
I should have informed that at "B" page, it has a region /oracle/apps/asn/opportunity/webui/ASNMgrOpptyQryRN and at page "D", the region is /oracle/apps/asn/opportunity/webui/ASNOpptyQryRN
Edited by: 933590 on Jul 19, 2012 1:37 PM -
When I click "Search" in the Firefox Google Toolbar it closes (it makes me leave) the web page I'm already on. I want to have the page I'm on and the new page available when I click "Search." Is this possible? Can I at least get a tab for the new page? thanks
Please see solution in http://kb.mozillazine.org/Problematic_extensions
for "McAfee Site Advisor".
(Windows): For best results you should uninstall '''McAfee Site Advisor''' from Control Panel > add/change programs (Programs and Features). Reboot the system. Then Reinstall from http://www.siteadvisor.com/ and reboot the system. When installing refuse other suggested (crapware) applications.
<br><small>Please mark "Solved" one answer that will best help others with a similar problem -- hope this was it.</small> -
ME23N purchase order history - add new fields (not in layout)
Hello,
I would like to expand the layout of Purchase order history (ME23N).
I would like to add the field MKPF-BKTXT into the purchase order history for more information.
Who can help? - Thank you. - DietlindeHello,
You might have to enhance the column set of the layout..I am not sure if it could be done.. but that's the way to go.. You might want to confirm this from your technical team.
Good Luck!! -
Can anyone tell me what I am doing wrong?
Want output to show N/A when nothing is entered in input string and to show the input string if something exists...
The output of the attached VI is expected it to be Larron, but instead is outputting LarronN/A.
Is there a way to make this VI do this without having to make a VI with an and/or component added to it?
Attachments:
SNR EX.vi 7 KBRight-Click the S&R function and select 'Regular Expression'
Search for ^$, replace with 'N/A' -
Add new mandatory column without killing concurrent transactions
I know of several approaches to this problem, but as the table in question is key to my organisation, I'd quite like to get this right first time!
I need to add a 1 character column to a large (approx 1 million rows, approx 100 cols) table which also happens to be central to our database (contains client details). The table is involved in the majority of transactions on our database, 24/7 so I need to find the method with the least impact on concurrent transactions.
We use mod_plsql for our applications, and a previous attempt (by another developer) caused all web pages to become unresponsive, followed by a database shutdown.
Any advice?Just a note that I ended up writing a pl/sql script which used a select for update cursor to update the non-locked rows, and stored any locked rowids in an associative array. It then looped round the array trying to update these rows until they were all done. Did the trick. DBA wasn't keen or the redefinition package when he saw what it did!
thanks,
M -
GWI: Add new filter criteria for replication object BUPA_MAIN
Hello,
we are currently setting up Groupware Integration with CRM 7.0 and Outlook Exchange 2007. We would like to filter the BPs that are replicated to Outlook's public folder. The replication object BUPA_MAIN in Tx. SMOEAC has only got the following criteria fields:
BPARTNER
CENTRALARCHIVINGFLAG
COUNTRYISO
INDUSTRY
IS_COMPETITOR
IS_CONSUMER
IS_CUSTOMER
IS_DELETED
IS_PROSPECT
PARTNEREXTERNAL
REGION
SEARCHTERM1
SEARCHTERM2
SITE_ID
We don't want to use any of those but would like to set a filter on BP Role and filter for all Groupware Employees. Only those should be replicated.
We did set the filter conditions in customizing under "Filter Condition for Business Partners Exchange with Groupware" in order to replicate only BP with role GWEMP but still during Initial Load all Business Partners were replicated.
Could anyone tell me how to avoid this?
I hear it's possible to add new criteria fields to the replication object BUPA_MAIN.
Could anyone tell me how this is done?
Your help will be much appreciated.
Thanks in advance!
AngelaHello Angela
Usually the settings under "Filter Condition for Business Partners Exchange with Groupware" should be enough to avoid the synchronization. With those settings all BP are filtered out except the ones with role GWEMP (Groupware Employee).
We have the following setting in SPRO:
BUPA 1 BUP001 X X
BUPA 1 BUP003 X X
BUPA 2 X X
BUPA 3 X X
(first column empty, second and third column with X, last column empty).
Regards
Marco -
Edit Add New Item link in certain view of list in SharePoint Programmtically
this is my requirements
i have one list called List 1 and two content types on it
CT 1 and
CT 2 and create two views on the list
View 1 to display items of CT 1
View 2 to display items of CT 2
the creation of list and views is done via XML
now i need to change the URL of add new item link in every view to open its content type, i.e. when i was on view 1 i click on add new item, it will open new item form of CT 1 and hen i was on view 2 and click on add new item, it will open new item form
of CT 2
i do a lot of search on the internet but get the following code but it doesn't work for me, i already wrote it in event receiver
SPSecurity.RunWithElevatedPrivileges(delegate()
SPWeb web = properties.Feature.Parent as SPWeb;
web.AllowUnsafeUpdates = true;
SPList contractList = web.Lists.TryGetList("Contract");
SPLimitedWebPartManager webpartManager = web.GetLimitedWebPartManager("Lists/ContractList/SICET%202A%20Contract.aspx", PersonalizationScope.Shared);
foreach (System.Web.UI.WebControls.WebParts.WebPart item in webpartManager.WebParts)
if (item.GetType().Name == "XsltListViewWebPart")
XsltListViewWebPart listViewWebPart = (XsltListViewWebPart)item;
Guid guid = new Guid(listViewWebPart.ViewGuid); // get the view details which is applied to web part
SPView sicet2AView = contractList.Views[guid];
sicet2AView.GetType().InvokeMember("EnsureFullBlownXmlDocument",
System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.InvokeMethod,
null,sicet2AView,null);
PropertyInfo nodeProp = sicet2AView.GetType().GetProperty("Node", BindingFlags.NonPublic | BindingFlags.Instance);
XmlNode node = nodeProp.GetValue(sicet2AView, null) as XmlNode;
XmlNode toolbarNode = node.SelectSingleNode("Toolbar");
//sicet2AView.ViewFields.DeleteAll();
if (toolbarNode != null)
string toolbarType = toolbarNode.Attributes["Type"].Value;
string linkText = "abdeen";
toolbarNode.Attributes["Type"].Value = "Freeform";
XmlAttribute positionNode = toolbarNode.OwnerDocument.CreateAttribute("Position");
positionNode.Value = "After";
toolbarNode.Attributes.Append(positionNode);
//toolbarNode.InnerXml = @"<IfHasRights><RightsChoices><RightsGroup PermAddListItems=""required"" /></RightsChoices><Then><HTML><![CDATA[ <table width=100% cellpadding=0 cellspacing=0 border=0 > <tr> <td colspan=""2"" class=""ms-partline""><IMG src=""/_layouts/images/blank.gif"" width=1 height=1 alt=""""></td> </tr> <tr> <td class=""ms-addnew"" style=""padding-bottom: 3px""> <img src=""/_layouts/images/rect.gif"" alt=""""> <a class=""ms-addnew"" ID=""idAddNewItem"" href=""www.facebook.com""]]></HTML><URL Cmd=""New"" /><HTML><![CDATA["" ONCLICK=""javascript:NewItem(']]></HTML><URL Cmd=""New"" /><HTML><![CDATA[', true);javascript:return false;"" target=""_self"">]]></HTML><HTML>" + linkText + @"</HTML><HTML><![CDATA[</a> </td> </tr> <tr><td><IMG src=""/_layouts/images/blank.gif"" width=1 height=5 alt=""""></td></tr> </table>]]></HTML></Then></IfHasRights>";
toolbarNode.InnerXml = @"<IfHasRights><RightsChoices><RightsGroup PermAddListItems=""required"" /></RightsChoices><Then><HTML><a class=""ms-addnew"" ID=""idAddNewItem"" href=""www.facebook.com"">Test</a></HTML></Then></IfHasRights>";
sicet2AView.Update();
//listViewWebPart.ViewGuid = sicet2AView.ID.ToString("B").ToUpper();
//listViewWebPart.Visible = true;
webpartManager.SaveChanges(listViewWebPart);
web.Update();
but it doesn't work, my first trail is changing the text of the link then go to change the link any help plz
Mohamed AbdeenHi,
The “Add new item” button will redirect users to add new item with the default Content Type of the current list.
So a workaround can be like this: We can change the default Content Type of this list every time when users open this list view page, then the “Add new item” button will work
as you expected.
Here is a link with code demo about how to programmatically set a content type as default content type in a SharePoint 2013 List:
http://www.ashokraja.me/tips/How-to-programmatically-set-a-content-type-as-default-content-type-in-a-SharePoint-2013-List
We can put the code into a Visual Web Part and add it into your two views, then when users open a list view page, the code will be executed to change the default Content Type
of the current list.
To develop a custom web part, you can take a look at the links below with steps in detail for a start:
Creating Web Parts for SharePoint
http://msdn.microsoft.com/en-us/library/ee231579.aspx
SharePoint 2013 Create a Visual Web Part
http://raquelalineblog.wordpress.com/2013/04/25/sharepoint-2013-create-a-visual-web-part/
Thanks
Patrick Liang
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Patrick Liang
TechNet Community Support -
How to create advanvance search page style oracle web with adf?
i want create advance search page. it can add parameter at runtime (select attribute from drop downlist and click add) how to?
OK - so you want to be able to change the attribute you are searching on..In that case I'd probably do something like create a search form with all possible parameters..then using Expression Language, hid the ones that are not the selected value in a drop down list....
I'll have a quick play and see if I can get this working but thats the idea anyway.
regards
Grant Ronald
Oracle Product Management -
Hi ,
I need to develop a page where in the errored records from some table will be displayed. This page will basically be used as Error UI for error handling and resolving those cases.This is basically for compensation data errors .. so the user should be able to process the errored records after seeing the error.
I am basically taking the approach of search page as there are different criteria the user shud be able to filter these records by ...
Now I need to have some search options in the search page ..have following requirements : Could anyone pls help m on these ..
1. want to create a dropdown/poplist for one of the items
2. there ll be a comments column in the results table which should be updatable by the user .. i shud be able to store that comments back in th table ..
Pls help on the same asap...
Regards,
PreetiPreeti,
My recommendation would be as follows:
1. Using a PLSQL API, pass all the Error data into a Custom Table.
2. Use this custom table to fetch data on the page.
3. If you know the Error types, create a lookup type for the Error and create multiple lookup codes for each Error type. You can write a query for the poplist and have it in the Search criteria. No issues.
4. If there is some other table which needs to be updated, invoke the PLSQL API to do so on click of some button on the page.
Do let me know in case the suggestions dont help.
Regards
Sumit
Maybe you are looking for
-
Could not be restored. an unknown error occurred (1669)
Dears, Thank you in advance for your usual support as a community. Here is my issue, When I try to restore my iPhone 5 from a backup using iTunes, I get an error message 'could not be restored. an unknown error occurred (1669)'. I tried Apple article
-
I can't tranfer photos to my ipod nano
Hi everyone, I have an 1G ipod nano and i can't transfer any photos to the ipod. iTunes always sais that there are not room for the photos even if I try to copy a single picture (50KB) and I see that the ipod have 47 MB free. No problems whit the mus
-
Cahnge the date dynamically in Maxl script
Hi All, I am excuting one max for clearing the data for particuler cells it s ok It will work for 9th month but next month it will not work until i dont change the value manually Dynamically i need to change alter database 'ACCOUNT'.'account' clear d
-
How to relink files inside an avchd package ?
I messed up a library and lost a project, then I found a copy of it in the backup folder, now when I open the project it asked me to relink files, but a part of them are inside an avchd package. How to relink those files ? Thanks
-
How I can configure 2 EP 7.0 server for SSO with ECC 6.0?
Hi, How I can configure 2 EP 7.0 server for SSO by using SAP Logon ticket with same ECC 6.0 back end? Developement EP 7.0 SP14 is already configure with ECC 6.0 back end now I want to configure my local EP 7.0 SP9 (Sneak Preview) server with same ECC