Custom AD Attributes using powershell
Hi,
Is it possible to create custom attributes using powershell v2/v3 ?
Marcel
Marcel,
Active Directory Cookbook, 3rd Edition has a way to do it. Unfortunately, they do not include the crucial step of assigning the new attribute to the class. My company has multiple developers each with their own VM and we need to be able to do this hundreds
of times internally and for our clients. I have been struggling for weeks trying to find the final piece. (recipe 10.7). Please let me know if you can figure out the last step
Using PowerShell
To create a schema attribute using the Quest tools, use the
new-QADObject
cmdlet as
follows:
new-QADObject -ParentContainer 'cn=schema,cn=configuration,
<ForestRootDN>'
-type
'attributeSchema' -name 'adatum-LanguagesSpoken' -ObjectAttributes
@{lDAPDisplayName='adatum-LanguagesSpoken';
attributeId='1.3.6.1.4.1.999.1.1.28.3';oMSyntax='20';attributeSyntax='2.5.5.4';
isSingleValued='FALSE';description='Language a user speaks';searchFlags='1'}
To create a schema attribute using native PowerShell functionality, use the following
syntax:
$root = [ADSI]"LDAP://RootDSE"
$schema = $root.schemaNamingContext
$parentCont = [ADSI]("LDAP://" + $schema)
$newAttr = $parentCont.Create("attributeSchema","adatum-LanguagesSpoken")
$newAttr.put("lDAPDisplayName","adatum-LanguagesSpoken")
$newAttr.put("attributeId","1.3.6.1.4.1.999.1.1.28.3")
$newAttr.put("oMSyntax", 20)
$newAttr.put("attributeSyntax", "2.5.5.4")
$newAttr.put("isSingleValued", $false)
$newAttr.put("description", "Languages a user speaks")
$newAttr.put("searchFlags", 1)
$newAttr.SetInfo()
Discussion
To create an attribute, you need to add an
attributeSchema
object to the
Schema
container.
Typically, when you extend the schema, you perform several additions or modifications
at once. The order of your extensions is very important. You can’t create a
class, assign an attribute, and then create the attribute; you obviously need to create
the attribute before it can be assigned to the class.
Bud - MCITP
Similar Messages
-
Modify an user attribute using Powershell script
In the current account creation script I am setting the following two attributes targetAddress and proxyAddressess:
$UserAttributes[0].Add('targetAddress', $User.mail)
$UserAttributes[0].Add('proxyAddresses', "SMTP:" + $User.mail)
I need to be able to change these values sometimes. I thought if I replaced add with replace that would work it did not.
Ideas?
Here is the whole function:
$AttributeItems=$UserAttributes[0].GetEnumerator()
ForEach ($AttributeItem in $AttributeItems) {
$AIKey=$AttributeItem.Key
$NewAttribute=$AttributeItem.Value
$ADAttribute=$FullUser.$AIKey
if ($ADAttribute -ne $NewAttribute) {
Set-ADUser $User.sAMAccountName -Replace @{$AIKey=$NewAttribute}
$UserAttributes[0].Add('targetAddress', $User.mail)
$UserAttributes[0].Add('proxyAddresses', "SMTP:" + $User.mail)
$ClearCount=$UserAttributes[1].Count
If ($UserAttributes[1].Count -gt 0) {
Set-ADUser $User.sAMAccountName -Clear $UserAttributes[1]
$enattendantgodot='Hold on there pardner!'I'm using example 4.
This is what I have:
$UpdateUserAttributesArray = 'sn','givenName','initials','displayName','info','mail','departmentNumber','department','telephoneNumber','ipPhone','title','physicalDeliveryOfficeName','employeeType'
Function StudentNameChange {
$Attributes=BuildUserTable $UpdateUserAttributesArray
Set-ADuser $User.sAMAccountName -Replace @{mail="$User.mail";targetAddress="$User.mail";proxyAddressess="SMTP:$User.mail";sn="$User.sn";cn="$User.sn + $User.givename"}
$UpdateUserAttributesArray sets the value for the import file.
StudentNameChange should set the updated value has needed.
The script runs but no settings are changed.
Set-AdUser $User.sAMAccountName -mail $User.mail -surname $User.sn
Like that.,
Replace is only for optional attribute.
Function does not specifi $user so that may also be missing.
I think you need to spend some time learning the basics of PowerShell. It looks like you are just gluing things together thazt you have found with no understranding of how any of the bits work.
Try just setting one user at a command prompt until you see how the CmdLet and PowerShell work. Post single simple questions as you try each parameter.
# build a test user object
$user New-Object PsObject@{
SamAccoutnName='somename'
Mail='[email protected]'
SN='lastname'
GivenName='John'
proxyAddresses='...<list of addresses>'
#start like this and add items until you understand what is working.
Get-AdUser $user.SamAccountName |
Set-AdUser -Surname $user.sn -GivenName $user .GivenName -Replace @{Mail='$($user.Mail'}
#use Rename-Object to change CN.
You need to learn the simple bits before you try to do grand things.
¯\_(ツ)_/¯ -
Custom tag attribute calculated by scriptlet expression
Hi,
If I set the rtexprvalue subelement of the attribute element in my tld to
"true", should I be able to dynamically determine the value of my custom tag
attribute using a scriptlet expression?
When I include the custom tag reference:
<prod:getCategory id="category"
categoryID="<%=request.getParameter("catID")%>" scope="page"/>
it actually gets written to the html as:
<prod:getCategory id="category" categoryID="2133" scope="page"/>
and is not recognized as a jsp tag.
I am using weblogic 6.0 sp1.
Thanks in advance!
daniel
I had the same problem in a design a couple of months ago and could not get around it so I switched the functionality into code and out of the tag lib.
I take it you are trying to do something like this?
<%
String value="hiworld";
%>
<mytaglib:saysomething value="<%=value%>"/> -
How can I call or reference custom action assembly in powershell script?
Hello
I have added some custom action in document library settings. Now I want to use this custom action properties using powershell for some bulk operations. So for this I want to call this custom action assembly and set a reference in PowerShell script and then
update custom action properties.
Please let me know how can I do this?
AviIf you also want to automate this than there is a CodePlex action that'll possibly come in handy for you.
https://ilovesharepoint.codeplex.com/wikipage?title=Execute%20PowerShell%20Script%20Action&referringTitle=Workflow%20Actions%20for%20SharePoint%20Designer%202010
Steven Andrews
SharePoint Business Analyst: LiveNation Entertainment
Blog: baron72.wordpress.com
Twitter: Follow @backpackerd00d
My Wiki Articles:
CodePlex Corner Series
Please remember to mark your question as "answered" if this solves (or helps) your problem. -
Custom List Form creation using Powershell - SharePoint 2013
Hi,
I have a custom List called 'IssuesList' with 4 fields - "IssueTitle","IssueID","IssueDesc","Status"
While displaying display form I should show 3 fields expect Issue ID i.e. IssueID should be hidden.
and on edit form only Status field should be editable. So using SharePoint designer I created respective Edit form and display forms and changed XSLT to control the display mode on the fields.
I have everything scripted in powershell till now - creation of custom list, publishing pages, webparts etc. however I am looking for how to provision or associate these 2 list forms with IssuesList after I create the list in new site.
I have restrictions on using wsp and site/list template due to business needs. So I need to know if there is any way I can upload these 2 files after I create custom list in powershell and associate them as defaultdisplay and defauteditforms?
Please advise.Hi,
Per my understanding, you might need to apply these custom forms to a list after list creation using PowerShell.
With PowerShell with SharePoint Object Model, we can hide fields on list forms.
The similar thread below with code snippet will provide more information about this:
https://social.technet.microsoft.com/Forums/en-US/ee6fc2eb-197f-4144-94fa-8a4e438675d9/hide-a-field-from-edit-form-list?forum=sharepointgeneralprevious
If there may be other requirements except for hiding fields, as you have limitation on using custom solution package(which should be preferable in such scenario),
a workaround I can provide is that, after list creation, you can add Content Editor Web Part contains the CSS style or JavaScript to the form pages of a specific list, it will help you hide/disable the specific elements, this can be achieved programmatically.
The code below can add a Content Editor Web Part to the DisplayForm of a list(though in C#):
public static void AddCEWP()
SPLimitedWebPartManager manager = null;
SPFile file = null;
using (SPSite site = new SPSite("http://sp"))
using (SPWeb web = site.RootWeb)
try
web.AllowUnsafeUpdates = true;
file = web.GetFile(web.Url + "/Lists/List018/DispForm.aspx");
manager = file.GetLimitedWebPartManager(PersonalizationScope.Shared);
ContentEditorWebPart webPart = new ContentEditorWebPart();
XmlDocument xmlDoc = new XmlDocument();
XmlElement xmlElement = xmlDoc.CreateElement("HtmlContent");
//xmlElement.InnerText = "<strong>Hello World!</strong>";
//write the custom CSS style or JavaScript here
string content = "<style>your custom style here...</style>";
xmlElement.InnerText = content;
webPart.Content = xmlElement;
manager.AddWebPart(webPart, "Top", 0);
manager.SaveChanges(webPart);
web.Update();
catch (Exception ex)
//Utility.SPTraceLogError(ex);
finally
if (manager != null)
manager.Dispose();
web.AllowUnsafeUpdates = false;
About how to hide fields on Standard List Forms using jQuery:
http://social.technet.microsoft.com/wiki/contents/articles/21730.sharepoint-2010-conditionally-hide-fields-on-standard-list-forms-using-jquery.aspx
http://stackoverflow.com/questions/10010405/how-to-hide-a-field-in-sharepoint-display-form-based-on-the-field-name-jquery
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 Use PowerShell to Delete FIM Users That Have a Null attribute name
FIM Community Information Center Article
Wiki Page:
How to Use PowerShell to Delete FIM Users That Have a Null <attribute name>
Go to the FIM Community Information Center
Mike Crowley | MVP
My Blog --
Planet TechnologiesHave you run side-by-side metrics on this?
I've run the Delete Object method and your script against similar data sets and yours appears to take a fair bit longer. I'd have to re-run in identical circumstances, a few times, to really say for sure, but my initial impression is that it will take hours
longer.
I guess the point is somewhat moot anyway, as for me the bit that generally takes longest is the actual query, rather than the deletions.
Boy how I wish I could just enter something into the FIM Portal directly that would blast out a bunch of users matching a query. One day...
FIMSpecialist.com | MCTS: FIM 2010 | Now Offering
ECMA1->ECMA2 Upgrade Services -
SP 2013 - Use PowerShell to Add a Custom Web Part to a Page
Hello Community,
I need to add a custom web part to a page using PowerShell - has anyone done this and if so please provide guidance and code examples.
Thanks!
Tom
Tom Molskow - Senior SharePoint Architect - Microsoft Community Contributor 2011 and 2012 Award -
Linked-In - SharePoint GypsyBTW, here is my current code:
#$web= Get-SPWeb -Identity "http://c4968397007/sites/BRE"
$Url = "http://c4968397007/sites/BRE"
$pageUrl = "/SitePages/Home"
$webpartzone = 2
$index = 0
$fileName = "wp_DistrictHomePage_VisualWebPart1.webpart"
$web = Get-SPWeb $Url
$web.AllowUnsafeUpdates=$true
$webPartGallery = $web.Lists["Web Part Gallery"]
Write-Host "Searching webpart $fileName in web part gallery"
if($webPartGallery -eq $null)
Write-Host("Unable to retrieve Webpartgallery");
$webpart = $null;
$webpart=$webPartGallery.Items | ? { $_.Title -eq $fileName}
if($webpart -eq $null) {
Write-Host("Unable to retrieve webpart: $fileName") -ForegroundColor Red
else {
Write-Host("----------Adding Webpart--------")-ForegroundColor Yellow
$webpartmanager=$web.GetLimitedWebPartManager($pageUrl, [System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)
$errorMsg = "";
$xmlReader = New-Object System.Xml.XmlTextReader($webpart.File.OpenBinaryStream());
$webpart = $webpartmanager.ImportWebPart($xmlReader,[ref]"Error")
$webpartmanager.AddWebPart($webpart, $webpartzone, $index);
Write-Host("Webpart is added successfully") -ForegroundColor Green ;
$SiteURL =$Url
#---------------Test Page----------------------------
$PageName="Test.aspx"
$page=$web.lists["Pages"].Items | ? {$_.Name -eq $PageName}
$page.File.CheckOut();
Add-WebPartToPage "$SiteURL/Pages/$PageName" "Header" 0 "My Custom WebPart"
$page.File.CheckIn("Added Web part to a page");
$page.File.Approve("Added Web part to a page");
Tom Molskow - Senior SharePoint Architect - Microsoft Community Contributor 2011 and 2012 Award -
Linked-In - SharePoint Gypsy -
Home directory creation for local user accounts using powershell
Through Computer Management when I create a user, a home directory is created for the same user in the folder C:\Users.I am creating a user through powershell in a remote machine.I am using the following script to create user
$comp = [ADSI]'WinNT://localhost,computer';
$user = $comp.Create('User', 'account7');
$user.SetPassword('Welcome1');
$user.SetInfo();
The account is getting created. But no home directory is created for this user. How to create a home directory for a user using powershell? Also the user created through GUI is a member of the group 'Users' by default. How to add the user created to the
'Users' Group.Hi Cmm user,
Thanks for your posting.
To set the attribute of homedirectory for a user in powershell, please also try the cmdlet set-aduser:
import-module activedirectory
$HomeDrive=’Z:’
$UserRoot=’\\CONTOSO-FPS\Users$\’
$HomeDirectory=$UserRoot+$AccountName
SET-ADUSER $AccountName –HomeDrive $HomeDrive –HomeDirectory $HomeDirectory
I hope this helps.
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
How to add a certificate to IIS global "Server Certificates" list using PowerShell?
Hi, been surfing the web for an example on how to add a certificate to the "global" IIS "Server Certificates" list using PowerShell but to no luck. I already have code in place on how to tie / associate a specific website with a specific cert but not how
to add the new .cer file using the "Complete Certificate Request..." wizard using PowerShell.... I dont expect the final code to become published but if someone had an idea on howto integrate / get an entry point on where to interact between the "Server Certificate"
list in IIS and POSH I would be super happy! :|
I am runnign IIS on a Windows 2008R2 x64 Standard Edition if that helps..... of course, I would saddle for an CLI if there is no other way, but POSH is of course the way to go! :)
Thanks for the help in advance guys, take care!
br4tt3Hi and thanks for the suggestions!
Although it comes close, the suggested code example points on howto import / incorporate .pfx files - I am getting fed by .cer files which I need to add into the IIS console using POSH.
I tried explore the IIS.CertObj object but was not able to work out if this one could be used for importing / adding .cer files into IIS! However, launching the following command from a POSH console with Import-Module Webadministration already
loaded into that shell;
$certMgr = New-Object -ComObject IIS.CertObj returns the following error message:
New-Object : Cannot load COM type IIS.CertObj
From an IIS perspective I have the following components installed;
[X] Web Server (IIS) Web-Server
[X] Web Server Web-WebServer
[ ] Common HTTP Features Web-Common-Http
[ ] Static Content Web-Static-Content
[ ] Default Document Web-Default-Doc
[ ] Directory Browsing Web-Dir-Browsing
[ ] HTTP Errors Web-Http-Errors
[ ] HTTP Redirection Web-Http-Redirect
[ ] WebDAV Publishing Web-DAV-Publishing
[X] Application Development Web-App-Dev
[ ] ASP.NET
Web-Asp-Net
[X] .NET Extensibility Web-Net-Ext
[ ] ASP
Web-ASP
[ ] CGI
Web-CGI
[ ] ISAPI Extensions Web-ISAPI-Ext
[ ] ISAPI Filters Web-ISAPI-Filter
[ ] Server Side Includes Web-Includes
[ ] Health and Diagnostics Web-Health
[ ] HTTP Logging Web-Http-Logging
[ ] Logging Tools Web-Log-Libraries
[ ] Request Monitor Web-Request-Monitor
[ ] Tracing
Web-Http-Tracing
[ ] Custom Logging Web-Custom-Logging
[ ] ODBC Logging Web-ODBC-Logging
[X] Security
Web-Security
[ ] Basic Authentication Web-Basic-Auth
[ ] Windows Authentication Web-Windows-Auth
[ ] Digest Authentication Web-Digest-Auth
[ ] Client Certificate Mapping Authentic... Web-Client-Auth
[ ] IIS Client Certificate Mapping Authe... Web-Cert-Auth
[ ] URL Authorization Web-Url-Auth
[X] Request Filtering Web-Filtering
[ ] IP and Domain Restrictions Web-IP-Security
[ ] Performance Web-Performance
[ ] Static Content Compression Web-Stat-Compression
[ ] Dynamic Content Compression Web-Dyn-Compression
[X] Management Tools Web-Mgmt-Tools
[X] IIS Management Console Web-Mgmt-Console
[X] IIS Management Scripts and Tools Web-Scripting-Tools
[ ] Management Service Web-Mgmt-Service
[ ] IIS 6 Management Compatibility Web-Mgmt-Compat
[ ] IIS 6 Metabase Compatibility Web-Metabase
[ ] IIS 6 WMI Compatibility Web-WMI
[ ] IIS 6 Scripting Tools Web-Lgcy-Scripting
[ ] IIS 6 Management Console Web-Lgcy-Mgmt-Console
[X] FTP Server Web-Ftp-Server
[X] FTP Service Web-Ftp-Service
[X] FTP Extensibility Web-Ftp-Ext
[ ] IIS Hostable Web Core Web-WHC
More or less the one thing that I am trying to get up and running is an automated FTPS solution - I just use the IIS console to be able to troubleshoot / compare how things scripted from POSH interacts in the MMC representation. The error I am getting
might be that I am lacking some IIS components to be in place to be able to automate some parts of the IIS - as suggested by the IIS.CertObj object listed in the example..... I will get back if I can track down which component needs to be added to be
able to reference the IIS.CertObj object.
Br4tt3 signing out...
br4tt3 -
Hello all,
Could you possibly help me with provider-hosted app development/deployment process.
We developed SharePoint provider-hosted app that works just fine in development environment. Now we need to automate it's installation in test environment via powershell.
In AppManifest.xml that we are deploying we have key instead of explicit URL:
<App xmlns="http://schemas.microsoft.com/sharepoint/2012/app/manifest" Name="ShowAllRoomsApp" ProductID="{922a18aa-5592-b59a-4da9-4791baef02e7}" Version="1.0.0.0"
SharePointMinVersion="15.0.0.0">
<Properties>
<Title>SomeTitle</Title>
<StartPage>~remoteAppUrl/Pages/Default.aspx?{StandardTokens}</StartPage>
If we use as
https://technet.microsoft.com/en-us/library/jj655398.aspx recommends, we cannot specify Redirect Url as we can do this on
/_layouts/appinv.aspx
So now it seems like the only way to deploy this kind of solution is using appinv.aspx page.Or must we apply this URL in AppManifest on developing stage in Visual Studio?
What did I miss?
P. S. Even if I use /_layouts/appinv.aspx after powershell commandlets, I get error.hi,
to deploy provider hosted app you need 2 things
1. Client ID
2. Redirect URL.
What you can do you can generate app from visual studio using clientID and URL from developer enviornment.
Now a app file is just a simple compressed zip file if you rename it as .zip and extract you will find AppManifest
inside it. So to create an app for Testing enviornment what you have to to Get the CLient ID (from AppRegNew.aspx) in testing enviornment. Unzip .App file change the AppManifest with testing client ID and URL than again zip file and rename as .app.
Now if you upload this file it will work.
To automate this scenerio i have created a simple windows Application in which i Pass the Client ID and StartURl and an App File it unzips the app file make changes to app and again zip it.
public static class AppPackageHelper
public const string StartUrlExpression = "{0}?{1}";
public const string StandardToken = "{StandardTokens}";
public static string Publish(string appPath, string ClientId,string StartUrl)
string tempDir = string.Empty;
string outPutFile = string.Empty;
try
string parentDir = System.IO.Path.GetDirectoryName(appPath);
outPutFile = System.IO.Path.Combine(parentDir, ClientId + "-Winshuttle.app");
tempDir = System.IO.Path.Combine(parentDir, ClientId.ToString());
Directory.CreateDirectory(tempDir);
int lastInd = appPath.LastIndexOf('.');
string tempPath = string.Empty;
string targetFilePath = string.Empty;
string cabPath = System.IO.Path.Combine(tempDir, System.IO.Path.GetFileNameWithoutExtension(appPath) + ".cab");
FileInfo fInfo = new FileInfo(appPath) { IsReadOnly = false };
File.Copy(appPath, cabPath);
XDocument doc = null;
string appManifest = string.Empty;
using (ZipArchive zipArch = ZipFile.Open(cabPath, ZipArchiveMode.Update))
appManifest = string.Format(@"{0}\AppManifest.xml", Directory.GetParent(cabPath).FullName);
ZipArchiveEntry manifestEntry = zipArch.Entries.LastOrDefault(e => e.Name.ToLower() == "appmanifest.xml");
manifestEntry.ExtractToFile(appManifest);
doc = XDocument.Load(appManifest);
XNamespace ns = doc.Root.GetDefaultNamespace();
string defaultUrl = string.Format(StartUrlExpression, StartUrl.TrimEnd('/'), StandardToken);
doc.Descendants(XName.Get("StartPage", ns.NamespaceName)).First().Value = defaultUrl;
doc.Descendants(XName.Get("RemoteWebApplication", ns.NamespaceName)).First().Attribute(XName.Get("ClientId")).Value = setupInfo.ClientId.ToString();
doc.Save(appManifest);
if (manifestEntry != null)
manifestEntry.Delete();
zipArch.CreateEntryFromFile(appManifest, "AppManifest.xml");
int totEnt = zipArch.Entries.Count;
for (int e = 0; e < totEnt; e++)
if (zipArch.Entries[e].Open().Length == 0)
//if (zipArch.Entries.Count > totEnt && e >= totEnt) break;
//zipArch.CreateEntry(zipArch.Entries[e].FullName);
File.Delete(appManifest);
if (File.Exists(outPutFile))
File.Delete(outPutFile);
File.Move(cabPath, outPutFile);
return outPutFile;
catch
throw;
finally
if (System.IO.Directory.Exists(tempDir))
System.IO.Directory.Delete(tempDir, true);
return outPutFile;
using System.IO.Compression.FileSystem.dll.
Also if you want to do it using powershell You need to do the same thing unzip-> changes values-> zip
So basic thing is You need to ahve only valid AppManifest file which contains 2 valid values Client Id and StartUrl
if you changes it inside appmanifest manuall than it will also work. Using above code you can create a console Application to do it. You can use powershell it just that i dont know how to zip unzip in powershell but i am pretty sure you can easily find it
on searching.
Whenever you see a reply and if you think is helpful,Vote As Helpful! And whenever you see a reply being an answer to the question of the thread, click Mark As Answer -
How to create Image as Custom Property Type used in Configurable Web Part?
I wanted to create custom configurable web part property for Image.
Example - the screenshot of Image property used in Image web part is shown below:
My goal is to create as many images as possible in custom configurable web part.
I tried to write the code:
[WebBrowsable(true),
WebDisplayName("Example Photo"),
WebDescription("Example Photo of the user"),
Category("Custom User Profile"),
Personalizable(PersonalizationScope.Shared)]
public Image ExampleUserPhoto { get; set; }
However, the result does not display Image configurable web part property.
I wonder why the data type Image does not cause the custom web part to have Image configurable web part property.
Other data types such as Boolean, Enum, Integer, String and DateTime can be used.
How can I create Image as Custom Property Type used in Configurable Web Part?I have examined that context node __00 has been enhanced,and has a class name z___00. But when I created a new attirubute by right click " Attributes" with wizard under context node __00.There is still a error message "view is not enhaced or copied with wizard".
But when I created a method "getvaliation " in the class of context node zcl__00, the attribute 'valiation' automatically created(at the same time the method "getvaliation' automatically created for the attribute 'valiation') and I need not to create attibute 'validation' by wizard . It seemed as if the problem is resloved. But when I make test for it in web ui .There is a runtime erro message.
Do I need to make some configurations in the business object layer for the checkbox? but the checkbox is only used as a flag to decide whether a backgoud job is needed to be executed.
Edited by: samhuman on Jun 22, 2010 10:31 AM -
How to create custom report plugin using child region report metadata
Hi,
I want to ask for help on how to create custom report plugin using child region report metadata. My idea is to create a child region, a classic report and set the condition to never.
Then i will query the child report metadata from apex view and use it to create a custom report like using jquery jq-grid. Any idea how i can create a process that will use the child report
metadata? I dont know how i can create a process just like how apex work, how apex render report, coz i want it to be control using the standard apex report attribute. This plugin will
render according to the child report attribute.
Is there anybody here had ever done this?Hi Nicolette,
Thanks for the reply. I know where to find the metadata, just asking for idea on how the rendering process will be.
Start from determining column heading, column order until finish rendering the report. The same way how apex
render the classic report.
Previously this imy my rendering process:
FUNCTION GETCOLUMN(P_REGION IN APEX_PLUGIN.T_REGION,
P_PLUGIN IN APEX_PLUGIN.T_PLUGIN,
P_VALUE IN VARCHAR2) RETURN SYS.DBMS_SQL.DESC_TAB2 IS
VSQLHANDLER APEX_PLUGIN_UTIL.T_SQL_HANDLER;
VCOLCOUNT NUMBER;
VCOLNAMES VARCHAR2(2000);
VAJAXIDENTIFIER VARCHAR2(100);
VPAGESIZE TYPEATTR := P_REGION.ATTRIBUTE_04;
VJSCODE VARCHAR2(32767);
BEGIN
VSQLHANDLER := APEX_PLUGIN_UTIL.GET_SQL_HANDLER(P_SQL_STATEMENT => 'select * from s_emp',
P_MIN_COLUMNS => 1,
P_MAX_COLUMNS => 999,
P_COMPONENT_NAME => P_REGION.ID);
VCOLCOUNT := VSQLHANDLER.COLUMN_LIST.COUNT();
FOR I IN 1 .. VCOLCOUNT LOOP
VCOLNAMES := VCOLNAMES || '{name: "' ||
UPPER(VSQLHANDLER.COLUMN_LIST(I).COL_NAME) || '",';
END LOOP;
APEX_PLUGIN_UTIL.FREE_SQL_HANDLER(VSQLHANDLER);
RETURN VSQLHANDLER.COLUMN_LIST;
EXCEPTION
WHEN OTHERS THEN
APEX_PLUGIN_UTIL.FREE_SQL_HANDLER(VSQLHANDLER);
RAISE;
END GETCOLUMN;
So this is how i get the header for my report plugin. The same method is use to get the value / data for each column. This process is work. So now
i want to extend my plugin so that i will use all attributes from the child report to render my plugin. So the column header, column order, all will depend
on the child report. And the column display condition is set, it will also check the condition before render the column. Sounds like i want to reinvent
the normal apex rendering process but this is what i want to achieve.
I need help to find the correct logic for my render process. Don't want too much for starting, just want to render the plugin correctly, same with child report,
same columns alias, column ordering and column conditional display.
Thanks,
akulala -
Rich Text Editor with Custom Text Attribute
Hello All,
We are using the latest version of Oracle Portal 10G. I have a need to create custom Attributes of the type text to let people enter a lot of text. But when User are in edit mode of an item where this custom attribute is used, the Rich Text Editor is not shown for entering the Text for the Custom Text Attribute. It shows a normal html text area. Has anyone ever used RTE with Custom Attribute?
I request you guys for help.
Thanks.The Problem with the Custom Attribute is not solved, but I have now compromised with the Situation and now I am not using a Custom attribute.
Rather, Now I am creating a Custom Item Type using Base Text Type (earlier i wanted to create custom item type at my own without any base item type). In this case now I will not be able to change the Lable of the RTE (that is "Text", when the Custom Item is in Edit Mode), but I hope that my users can understand that much.
I have created a template for portal pages. In the Template I can edit the Region Properties. When I edit the Region property of the region where I want to display my Custom Items. I get two Tabs on the top, Main and Attributes/Style. ON the main tab I can tell what type of region it should be, width etc, in my case it is item type region. And on the Attributes/Style tab, I can select from the availabe Attributes as which all Attributes I want to display. Here if i select only "Associated Functions" Attribute then normally portal should not render anything by default on the Page. It should rather make a call to the procedure which is associated with the Custom Item and as when I was creating the custom item type, I had clicked on "Display Procedure Results With Item", so portal should now display the result of my Procedure. So far it works without problem.
But the problem is that the Portal displays the text at its own also. As i have written that Portal should not display anything at its own, this doesn't work in this version of Portal for a Custom Item Type that is made using Base Text Item Type. For all others it has worked till now (I have create 50s of Custom item types).
You can better understand by going to the following URL. Just have a look between the two dotted lines (Dotted line is also a seperate Custom Item Type). Between the two Dotted Lines is a custom item, in general it would be a Custom News Item having title, image and so on.
http://sunnode1.edvz.sbg.ac.at:7778/portal/page?_pageid=79,56047&_dad=portal&_schema=PORTAL
I have really programmed a lot with portal but now at this stage where I am near to end, I am getting problems which are coming from Product. I request you for help. -
How to get Systemstate Backup size using PowerShell command in Windows 2008 R2
Hi,
We using WBSummary command to get completed backup status.
I need to find how much data is backed up using powerShell command .
Is there any way to get the details , i can see the GUI but no in command.
Please advise
Regards Gopi KHi,
You mentioned that you can see the system state backup size in the GUI. Does the backup size mean the amount of date transferred?
It seems that there is no such a PowerShell to get Systemstate Backup size. You may need to you need a PowerShell scripts to do this work.
http://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=ITCG
Regards,
Mandy
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
Hello Experts:
Does anyone knows if it is possible to create a Custom Dynamic Attribute for Bid Comparison where this custom Attribute can be automatically filled through a function module or program with some calculated value?
My requirement is to provide an automatic supplier qualification which can be used as a comparison attribute, the qualification could be calculated using supplier information from previous POs, Confirmations, etc.
Hope you can help me out
HugoHi,
Dynamic Attributes for Bid Invitation can be created using customization.
SPRO-> SRM Server->Bid Invidation - > Dynamic Attributes.
Generally the response to the dynamic attributes are given by Bidder when submitting the Bid.
For automaic population of response to the bidder do you want to do through report ?
you can implement "BBP_DOC_CHANGE" BADI metod "BBP_QUOT_CHANGE" for pupulating the response of dynamic attribute while submitting BId.
Regards
Kalandi
PS : Reward points if it helps you.
Maybe you are looking for
-
Is there a way to restore more than one MacBook Pro at the same time from an image? .
I restore each MacBook Pro one at a time from an Mountain Lion image on a firewire Hard Drive but each MacBook has to be done one at a time. When I re-image the PC's here at work I'm able to Ghost as many laptops I want simultaneously. Thank you
-
Vista does not recognize my iPhone / Not charging
Two problems: 1. Extemely slow charging: - I've had my iPhone plugged in to the wall all night. The battery meter only shows 20% power. - When charging from my computer or the mains, the charge icon does not appear. - I've tried charging off my lapto
-
Dynamic background behind text?
At the present time I am creating my bible texts externally using a pleasant background, and saving as a JPEG. I superimpose this over the video. This works very well, but I would like to use a moving background at times. The problem with the JPEG su
-
Submit Cancelled Dialog and Submiting by Email
Hello, I've googled this one pretty carefully and have found similar issues but never a solution I could get to fix the behaviour. I am using LiveCycle Designer ES (8.2) and have created a simple form. The goal is to use some of the collected informa
-
Can't install Java Studio Enterprise 8
I can't finish up installation of Java Studio Enterprise 8. I make these steps: 1. accept license 2. select all features to install 3. leave path unchanged (E:\Program Files\Sun\jstudio_ent8), but if I change it - installation is begun to that path a