SharePoint 2010 InfoPath Forms Library FileName - forms

I have a forms library in SharePoint 2010, and have designed the InfoPath form to add/update content to that library. Let's say that I have a field in the InfoPath form called "CustomFileName" - so that every time that field is updated, the InfoPath file's name is changed to that.
Instead, it is creating a new File/Entry every time the "CustomFileName" field is updated. I tried using Workflows, but it isn't an option since the CustomFileName values sometimes contains multiple periods that break the Workflow.
Checklist:
In the Data Connection Wizard, I do have "CustomFileName" specified in the "File Name" field
In the Submit rules, I do have a rule for when the "CustomFileName" is empty - to use a Name+".xml" notation
We need the file name to be renamed instead of creating a new file every time. Over-writing is okay, as long as we can trace the version history.
Any help here would be much appreciated.

Related

How do I run a mail merge but leave certain mergefields "unprocessed" i.e. don't remove certain mergefields conditionally

Our doc preparation team uses word templates and mail merges them from a database.
However, we would like certain mergefields to be ignored so that they can be processed later from another data source.
In this basic example below the word mail merge wizard doesn't allow me to just ignore the additional field that is not in the datasource (the excel spreadsheet).
Is there a programatic way to "ignore" extranious mergefields? Or even a way to use a regular text placeholder and have it merg-in a mergefield dynamically during mailmerge?
What you are asking is not possible. Even if you were to create dummy fields in your mailmerge data source so the extraneous fields don't generate errors, those same fields will be deleted when the merge is executed.

Run workflow over all entities to copy data from one field to another

I'm in a situation where i need to add a default value "blank" to my "Two Options" field. Since I cannot set a default value of "null" to an already created Two Options field, I though of creating a new custom field of type "Option Set" and add the same two options Yes/No in addition to setting the Default value to Unassigned.
I need to create a workflow that copies the old values choices into the new field. I understand that I can't simple equate the values of two fields of different type but I'm going to do that with Check conditions to set the new field value corresponding to the old field value.
I'm not sure how to run this workflow against all the existing records in my CRM online with no codes. Is that possible ?
Without using code or custom tools your best options are:
Do an advanced find, select all the records in the view and run the workflow - this will run the workflow against every record. You can view up to 250 records at a time (check personal settings to change this) so this might work for you.
Export all the data to Excel, make the change in Excel in bulk. Reimport the data. This way you don't need workflow at all.

Macros in main word document are lost in merged document

I'm performing a mailmerge via a VB app joining data from a CSV to an existing Word (2010) main document which contains some macros. When the merge is completed I display the merged doc with the data and the customer wants to run some of the macros that were in the main document against the merged document.
However, the macros from the main document don't exist in the merged document and I'm wondering if there is some way I can get them to come along for the ride.
(I do save the merged document before displaying to the user, so maybe the Save is causing me to lose them?)
Correct - the macros are not copied. If they were, you can imagine that an enormous maintenance problem could be created as every single merge document created would have a copy of the macros, not a pointer to them.
Typically, you have to put the macros in a template, and ensure that the mail merge main document is attached to the template (which will be the case if you create a new mail merge main document from the template, for example).
But when you do that neither auto macros such as autoopen and autonew, now the equivalent Document Events will run automatically when the mail merge output document is created or completed.
Also, ISTR that there is a problem where the macros may not be visible/usable until you have saved the output document (and possiby closed/re-opened it). I forget exactly what goes wrong.
If you really do need to copy the macros into the output document, I think you would be better off storing them in a .bas file outside any Word document, and you may be able to use the VB Extensibility library to load them into the output document.

Why there is no Tridion page template system metadata published to broker database?

We are using Tridion 2011 SP1 HR1 and New UI.
We would like to generate new UI JSON tags using our Java framework based on the Java content delivery API: Tridion delivery framework (TDF).
The JSON tag for the page should contain the PageTemplateModified parameter.
<!-- Page Settings: {"PageID":"tcm:48-84852-64",
"PageModified":"2013-02-28T15:04:30",
"PageTemplateID":"tcm:48-24343-128",
"PageTemplateModified":"2013-02-27T17:11:31"}
-->
But when a Tridion page or a Tridion page template is published to the broker database, the zip sent to the deployer does not contain any information about the page template. In the broker DB, ITEMS table does not contain any rows for page templates.
It is easy to verify using the following SQL query on the broker DB:
select * from items where item_type = 128
Is there a reason, why?
[edit]
I am speaking about system metadata.
This is very subjective,and not really a fit for Stack Overflow consider asking it at https://tridion.stackexchange.com/grant-beta-access?key=63880f9cbf452c62f726770209533893
I think the only way you will be able to get the modification date of a PT into your rendered page output would be to add the data to your page (or page meta) at publish time.
To answer the Why? Part of your Q, probably nobody thought of a reason for it, so it was never designed that way.
I was going to reply to the thread under Chris' answer, but it became too long...
The Last modified date setting in the XPM JSON cannot be the real last modified date, and I'll explain why.
When you load Experience Manager, it will quickly go through the various ""LastModified" settings in the JSON to compare with what is stored in the CM and determine if your page is up to date. If you published this page in December last year, then modified the template in January, the dates should not match - and XPM will let the editor know that "this page is not up to date, click here to reload".
If you would now change that last modified date "on the fly" to be the real last modified date of the template as opposed to the last modified date of the template at the time this page was published then XPM will not detect that there was a change made to the template on the CM and the editors may have unexpected results, like changing the value of a field, reload, and suddenly their sidebar is on the left instead of being on the right.
Hope this helps

CRM 2011 and SSRS - Generating a report for a single record

Is it at all possible using CRM 2011 and SSRS to generate a report on a single record, and only get results for that one record?
EDIT
Additional Info - Must Use:
Custom SSRS report
Custom entity in CRM
Here's a more specific link to your question: link. You're probably looking for pre-filtering (look for "3. Pre-filtering Element" in the link provided) if you want the report to be record specific (context sensitive).
Here's a link describing the 2 types of pre-filters (CRM 4.0 but the theory applies to CRM 2011): link. And here's an example of prefiltering in CRM 2011: link
I have done this successfully in CRM 2011 with a completely custom report made in BIDS, on a custom entity, with full context sensitivity.
Make sure to learn fetchXML as it's going to be the going forward technology for these reports. The existing reports are using SQL which make them bad examples to copy off of.
Here's an example on how to extract fetchXML from an advanced find: link It also has more information on pre-filtering.
Take a look a the report Account Overview.rdl. It could be executed for a single account record or multiple records.
See Reporting for Microsoft Dynamics CRM Using Microsoft SQL Server Reporting Services
Create an embedded connection to the CRM database engine for the environment you want to target.
Create an embedded dataset to query the current record. This going to be kind of weird since experience will tell you that you are going to get tons of records, but because of the clunkiness behind CRM it will actually only get the current record. For example, if you wanted to get the current quote you would use "SELECT quoteid FROM FilteredQuote AS CRMAF_Quote"
Add a parameter to store the reference to the entity you just queried. In keeping with this example I created #QuoteFilter which is type text, could store multiple values (even though that's not what we're using it for), and gets its default value from the dataset in step 2. Also, probably ought to make this hidden since GUIDs aren't end user friendly.
Finally, use the parameter discovered in the where clause of the other datasets. For example, a search on quote products for the current quote would look something like SELECT * FROM FilteredQuoteDetail WHERE (quoteid = #QuoteFilter)
As a final note, you should keep in mind that CRM loves to remember everything even when you don't want it, too. On one of my reports I messed up my datasource and CRM was forever convinced that the report should run against all records. I fixed my datasource, but uploading the report did not trigger a refresh and correct the problem. In the end, I deleted the report from CRM, created a new one, uploaded the same exact file with no changes, and everything worked. Go figure.