• Jessi McPeek
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 2
    Likes Given
  • 3
    Questions
  • 0
    Replies
After the Spring '18 release the text on buttons on the community (created using Napili template) are showing blue (these were white before the Spring '18 update). This is impossible to read on my branded buttons (even buttons created by Salesforce that use the branding styling) Is there a new setting to control text color that I am missing or is this a bug in the new release?
 User-added image
I am trying to overwite the new button to display a visualforce page so I can control what fields are visible based on the selection of a picklist. I can overwrite the "New" button to use the visualforce page I have written. The new button on Salesforce Platform will call the visualforce page, however my new button completely disappears on my partner community.
The community has the visualforce page available under "Site Visualforce Pages" and all profiles on the community have permission to the visualforce page. I have also tried making it a list page button and the button will appear only on my "All" view for my custom object on the Salesforce Platform and will not show under any of my list views on the partner community.
I know the page is available for the community because I can drop a visualforce component onto my partner community and have the option to select the page. 

Any Ideas on why this is happening and what I can do to fix it?
I have users attaching images that are to be pushed through an API to an outside website. We are currently attaching the images as files in the related list to our custom object. However these files will sometimes auto rotate on the view so they appear to be uploaded in the correct orientation (for example a picture of a person is showing in portrait, but is saved as a landscape), but when the file is downloaded it is showing in the landscape orientation, making it push to our outside site as a landscape photograph. We are accessing the image through the content version object.

Is there a way to tell if the view of the image is different than the original file orientation? 

Is there a way to change the orientation of the image programmaticaly so that is is stored in the correct orientation? 
for(ContentDocumentLink doclink : [select id, ContentDocumentId from contentdocumentlink where LinkedEntityId = :sObject.id Limit 1])
{
    for(ContentDocument img : [Select id, title, fileExtension, Createddate from ContentDocument 
                               where id =:doclink.ContentDocumentId and 
                               (fileExtension = 'jpg' or fileExtension = 'jpeg'or fileExtension ='png' or fileExtension = 'gif')
                               order by CreatedDate asc Limit 1])
    {
        for(ContentVersion version : [Select versionData, PathOnClient  from contentVersion where ContentDocumentId =: img.id])
        {
            
            Blob image = version.versionData;             
        }
    }
}
I am trying to overwite the new button to display a visualforce page so I can control what fields are visible based on the selection of a picklist. I can overwrite the "New" button to use the visualforce page I have written. The new button on Salesforce Platform will call the visualforce page, however my new button completely disappears on my partner community.
The community has the visualforce page available under "Site Visualforce Pages" and all profiles on the community have permission to the visualforce page. I have also tried making it a list page button and the button will appear only on my "All" view for my custom object on the Salesforce Platform and will not show under any of my list views on the partner community.
I know the page is available for the community because I can drop a visualforce component onto my partner community and have the option to select the page. 

Any Ideas on why this is happening and what I can do to fix it?
I have users attaching images that are to be pushed through an API to an outside website. We are currently attaching the images as files in the related list to our custom object. However these files will sometimes auto rotate on the view so they appear to be uploaded in the correct orientation (for example a picture of a person is showing in portrait, but is saved as a landscape), but when the file is downloaded it is showing in the landscape orientation, making it push to our outside site as a landscape photograph. We are accessing the image through the content version object.

Is there a way to tell if the view of the image is different than the original file orientation? 

Is there a way to change the orientation of the image programmaticaly so that is is stored in the correct orientation? 
for(ContentDocumentLink doclink : [select id, ContentDocumentId from contentdocumentlink where LinkedEntityId = :sObject.id Limit 1])
{
    for(ContentDocument img : [Select id, title, fileExtension, Createddate from ContentDocument 
                               where id =:doclink.ContentDocumentId and 
                               (fileExtension = 'jpg' or fileExtension = 'jpeg'or fileExtension ='png' or fileExtension = 'gif')
                               order by CreatedDate asc Limit 1])
    {
        for(ContentVersion version : [Select versionData, PathOnClient  from contentVersion where ContentDocumentId =: img.id])
        {
            
            Blob image = version.versionData;             
        }
    }
}
I need to restrict View button override based on Record type of Opportunity using page action method using URLFOR function. Based on the record type, I need to rediredt the page to standard detail page or another vfpage. I tried few things, but I can't get this thing working. Somehow i cannot get it to redirect it to standard detail page, what am I doing wrong here?.
 
<apex:page standardController="Opportunity"  action="{!URLFOR(CASE(Opportunity.RecordType.Name, 'RecType1',  '/apex/vfpage1', 'RecType2', 'apex/vfpage1', 'RecType3', $Action.Opportunity.View, '/apex/vfpage1'), Opportunity.Id) }">
     <apex:variable value="{!Order__c.RecordType.Name}" var="recTypeName"/>-
</apex:page>
I used the below references:

http://salesforce.stackexchange.com/questions/33192/how-to-override-edit-button-for-custom-visualforce-page-based-on-recordid/33193#33193
https://salesforce.stackexchange.com/questions/63203/override-standard-edit-button-based-on-recordtype/63252
 
We have users in both Classic and Lightning using the standard "New" button on leads.  I need to override the standard "New" button and redirect the user to a lightning app.  I created a VF page action that will redirect the user to the lightning app.  Everything works great however for lightning users, the redirect opens a new tab in the browser.  How do I keep the redirect on the same browser window in lightning?  Do I need to create a VF page pulling in a lightning component?