Forms designer forms provision
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Hello, Dikesh!
Not sure what the problem with 4th parameter is - you are talking about FormType right?
When you run this command, you get enumerator which has these parameters:
It's stored in here:
Not sure what the problem with 4th parameter is - you are talking about FormType right?
When you run this command, you get enumerator which has these parameters:
Code: Select all
$srv = New-WebServiceProxy -Uri $serviceUrl -UseDefaultCredential -Namespace "myTest" -Class "FormsDesigner"
Code: Select all
$namespace = $srv.getType().namespace;
Cheers
Hi Nikita,
Yes. I am talking about form type i.e.: 4th parameter. In C#, I can able to access form type using namespace. But in PowerShell it's not working. I am trying to access form type using below code:
It gives below error:
Yes. I am talking about form type i.e.: 4th parameter. In C#, I can able to access form type using namespace. But in PowerShell it's not working. I am trying to access form type using below code:
Code: Select all
$srv = New-WebServiceProxy -Uri $serviceUrl -UseDefaultCredential -Namespace "myTest" -Class "FormsDesigner"
$namespace = $srv.getType().namespace;
$formType = New-Object ($namespace + ".Forms.New");
Cannot find type [myTest.Forms.New]: verify that the assembly containing this type is loaded.
Hi everybody,
Finally I found solution to publish forms using PowerShell.
Please see my code as below:
Thank you.
Finally I found solution to publish forms using PowerShell.
Please see my code as below:
Code: Select all
$srv = New-WebServiceProxy -Uri $serviceUrl -UseDefaultCredential -Namespace "FormsDesigner.Data"
$result = "false"
$resultSp = "false"
$namespace = $srv.getType().namespace;
$formType = New-Object ($namespace + ".Forms");
$srv.PublishForms($listID, $contentID, $groupID, ($formType.GetType()::New), $true, $formValue); #Change Form type(New, Edit, Display)
$srv.Dispose();
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Great to hear it! Thank you for the code, will be very useful as an example in the future.
Cheers
Hi Everybody,
I can able to publish forms in site using web service and PowerShell. But if I am trying to publish in sub site, it will not published.
For example, my site url is http://spfoundation:1111/abc/ and I am going to publish forms in list on site ABC then it will not be published.
Thanks.
I can able to publish forms in site using web service and PowerShell. But if I am trying to publish in sub site, it will not published.
For example, my site url is http://spfoundation:1111/abc/ and I am going to publish forms in list on site ABC then it will not be published.
Any help would be appreciated!It always gives "List does not exist" error.
Thanks.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 15 guests