I'm trying to define the DisplayPattern of a custom field to do as follow. It's a simple text field used in document libraries, but i want the text entered to be displayed as a link to the document in the list view.
<URL Cmd="Display"> gives me the display form, but I want the link to actually download/open the document...
I can't for the life of me figure this one out...
Thanks for your help!
The answer lied in <LookupColumn Name="FileLeafRef" /> used along with <ListUrlDir />...
Related
I created a simple visualforce page to override the standard salesforce.com page for "New" and "Edit" for a Custom Object.
It is pretty simple, it was just because in the standard salesforce.com page the textarea was not wide enough, since the form is splitted in two columns. (Or am I wrong? Is there a way to accomplish that without creating a custom visualforce page?)
Well, here is the code:
<apex:page standardController="Object__c">
<apex:sectionHeader title="Object Edit" subtitle="{!if(Object__c.id==null,'New Object',Object__c.Name)}"/>
<apex:form >
<apex:pageBlock title="Object Edit" mode="edit">
<apex:pageblockbuttons >
<apex:commandbutton action="{!save}" value="Save"/>
<apex:commandbutton action="{!cancel}" value="Cancel"/>
</apex:pageblockbuttons>
<apex:pagemessages />
<apex:pageblockSection title="Basics" columns="2">
<apex:inputField value="{!Object__c.Field1__c}"/>
... more fields
</apex:pageblockSection>
<apex:pageblocksection title="Details" columns="1">
<apex:inputField value="{!Object__c.Field10__c}"/>
... more fields
</apex:pageblocksection>
</apex:pageBlock>
</apex:form>
</apex:page>
Ok, the page looks good on force.com, but when I open it from within the salesforce1-App on my iPad it has the same style like on force.com and not the nice styling like the other (standard salesforce.com page-)forms in the salesforce1-App?
To get the styling right, consider using the Mobile Design Templates: https://developer.salesforce.com/en/mobile/services/mobile-templates/templates-faq.
I think you would also benefit from reviewing this slide deck: http://www.slideshare.net/developerforce/visualforce-in-salesforce1-1-1. It specifically asks developers to avoid using pageBlocks in Salesforce1. The author of those slides is Sandeep Bhanot, who, in general, is a great person to connect to on Twitter/Youtube, etc, for all your Salesforce1 needs.
You can have textarea span 2 columns in std page layout by putting it to separate section and setting columns to 1. Just hover over the section header, click the wrench icon on the right and you should get a popup like this:
I'd say for such change it's bit of an overkill to go full VF page route. But if you really need it or my trick won't work - there are few questions on Salesforce-dedicated site that might be a good start for you:
https://salesforce.stackexchange.com/questions/22290/sfdc-styleguide-usage-questions-in-salesforce1
https://salesforce.stackexchange.com/questions/25541/salesforce1-look-feel-in-visualforce
https://salesforce.stackexchange.com/questions/27788/how-to-do-visualforce-page-with-the-same-look-feel-as-salesforce1
https://salesforce.stackexchange.com/questions/37111/mobile-view-one-one-app-differs-from-native-salesforce1-view (not really related but it's my answer so :P Seriously though - the presentations I've linked to in that answer really helped me to kick off my development)
I want to create tool tips for each part in a form which employees have to fill in a share point web page. When users move the mouse cursor on each field (Title, description, department etc.) the related tip will be automatically became visible as a simple pop-up (tool tip) and summarize what they should write there. and when the mouse cursor is not on one of these fields there is no tool tip.
How can I design such a system via share point designer? I am not able use any add ons. I can't upload any additional things to the server. I have to make page based design.
I would be glad if you kindly help me.
Have you considered using field description?
This is SharePoint's default way of adding additional information to fields.
I couldn't find the ToolTip control in my SharePoint Designer 2007 Toolbox, so I looked on W3Schools.com for a standard HTML option and found that you can use the <ABBR> tag.
See http://www.w3schools.com/tags/tag_abbr.asp for the reference, but here's an example of a tooltip implemented on a SharePoint field title in a display form:
<td valign="top" class="ms-formlabel" style="width: 50px">
<H3 class="ms-standardheader">
<nobr><abbr title="The actual number of man-days effort expended.">Man-days (Actual)</abbr></nobr>
</H3>
</td>
Open up the aspx page for the form in SharePoint designer. Then you can use SharePoint designer just like Visual Studio to see the code. Try adding the "tooltip" attribute to the field controls within the form. There is a small possibility these controls will actually be written using XSLT instead of ASP, so be prepared to do some studying.
By default the display name of the site column becomes the tool tip for that field.
I have a custom sharepoint form where I want to add a FormToolbar with upload functionality to it.
I added it like this
<SharePoint:FormToolBar runat="server" ID="ft" ControlMode="New" />
when I click on the attach file link it diplays a message saying "this form was customized not working with attachemnets".
I searched for this error and found that there is a fix and a method to make this work with a custom NewItem.aspx, the workaround was to modify the XSL.
My page is custom and has no XSL the fix is not applicable for me.
so is there a solution to this ?
thanks
This KB article may help: http://support.microsoft.com/kb/953271 if you are using SharePoint Designer to create your custom form. It sounds like you're using this approach (http://msdn.microsoft.com/en-us/library/aa543922.aspx) though.
I'm creating some pages using a SiteDefinition, the markup looks something like this:
<File Url="Page.aspx" Name="$Resources:SiteDefinitions,PageName;" Type="GhostableInLibrary">
<Property Name="Title" Value="$Resources:SiteDefinitions,PageTitle;" />
<Property Name="PublishingPageLayout" Value="~SiteCollection/_catalogs/masterpage/Somepage.aspx"></Property>
<AllUsersWebPart WebPartZoneID="WebPartZone1" WebPartOrder="1">
-- webpart data here
</AllUsersWebPart>
</File>
The page is created as expected, but it's somewhat faulty. If for instance I click Edit Page and then click Publish (without actually editing anything) I will get this error:
"This Page has been modified since you opened it. You must open the page again."
I will get this error approx. every second time I try an editing action.
If I manually create a page using the same page layout everything works as expected and this error does not show up.
Does anybody have an idea what could be wrong?
I too create a Page using the above method only thing I found missing in your code is that I used to have a title in the PageLayout as
<Property Name="PublishingPageLayout" Value="~SiteCollection/_catalogs/masterpage/Somepage.aspx, Your title"></Property>
This should not be the cause, but you can try it, Also refer the articles this or this
I think you're right with using PublishingLayoutPage. I came across this article today while searching for this error caused by something else. It describes your same issue although the person in the article was not inheriting from PublishingLayoutPage and had not specified the PublishingPageLayout property. When they fixed this it worked.
This doesn't directly help you, although I did notice in their article that they are specifying the ContentType property. Have you tried specifying this? As you can see your complete code, are there any other differences you see from the article or additional information from the comments?
Okay, I (kinda) got this working now.
The guy who had made the ONET.xml had put a reference to the page layout in the Url attribute of the element.
Like I wrote in a comment earlier I tried making the page layouts inherit from TemplateRedirectionPage. Instead I now made an empty default.aspx file that inherits from TemplateRedirectionPage and changed all my page layout files back to deriving from the PublishingLayoutPage. And then I added the PublishingPageLayout element below every element.
Funny, or oddly, having a refence to the page layout in the Url attribute and not having the PublishingPageLayout element at all is actually valid. It doesn't make sense, because it will produce these faulty pages, but SharePoint actually accepts it and spits out all the pages defined in the ONET.xml
Only thing left now is that since I made the above changes, when I manually create a new page based on a page layout every default webpart (as defined with AllUsersWebPart) is instantiated 5 times. Really don't know where this behaviour is coming from, but at least it's not as serious as not being able to edit/publish my pages :)
I have a custom SharePoint page with several dataviews. The dataviews essentially filter documents matching a certain criteria from a document library and display a link to the document along with some other meta data.
The problem I have is that when a document has a single quote in it's title, the character is being rendered as ' and invalidating the link. This is the code within my custom page that is displaying the invalid link.
<A onfocus="OnLink(this)" HREF="{#FileRef}" onclick="return DispEx(this,event,'','','','','{ddwrt:ListProperty("DefaultItemOpen")}','{ddwrt:MapToControl("", string())}','{#HTML_x0020_File_x0020_Type}','','{ddwrt:GetUserID('CheckoutUser')}','{$Userid}','{ddwrt:ListProperty("ForceCheckout")}','{$FieldIDA5KNTB}','{ddwrt:CurrentRights()}')"><xsl:value-of select="ddwrt:UrlBaseName(string(#LinkFilename))" /></A>
Does anyone have any thoughts on how I can ensure the #FileRef variable is encoded correctly before being rendered?
Many thanks in advance :)
you need to use the ServerURL or EncodedAbsUrl properties, this guys written it out already:
Itay Shakury's blog