• Avijit Chakraborty 11
  • NEWBIE
  • 30 Points
  • Member since 2014

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 11
    Replies
I wanted to enforce a minimum price on an item and am managing it as a custom setting.  I have a validation rule checking it, but the text of the validation rule is not properly substituting the text of the custom setting variable reference.

Is this even possible?
Hi ,

As per our requirement we need to create some user from a .xls file to salesforce . I am nave in .xls same in VB diid in my collage days any body can help me out with this I got this https://github.com/timhall/Excel-REST but unable to use it any guidance appriciatecd 

Not looking for any other solution like using dataloader or custom app on force.com I already have those but businees doesnot like that 


Hi.
I am trying to create a word file by visualforce.
I am trying to attach it as an attachement for an accout record.

Everything is working fine, the file is getting generated and getting attached to current account record.
But when I try to open the word file for reading.
it's saying :

User-added image

Can some guide, where I am making the mistake?

Thanks in advance.
=================

Here is the code I ma using:

<apex:page controller="WordAttachementGeneratorController"> 
  <apex:sectionHeader title="Word Example" description="Example of how to attach a Word to a record."/>

  <apex:form >
    <apex:pageBlock title="Word Input">

      <apex:pageBlockButtons >
        <apex:commandButton action="{!saveWord}" />
      </apex:pageBlockButtons>
      <apex:pageMessages />

      <apex:pageBlockSection >

        <apex:pageBlockSectionItem >
            <apex:outputLabel value="File Name" for="pdfName"/>
          <apex:inputText value="{!WordName}" id="pdfName"/>
        </apex:pageBlockSectionItem>

        <apex:pageBlockSectionItem >
            <apex:outputLabel value="Account ID" for="id"/>
          <apex:inputText value="{!parentId}" id="id"/>
        </apex:pageBlockSectionItem>

      </apex:pageBlockSection>

    </apex:pageBlock>
  </apex:form>

</apex:page>
public with sharing class WordAttachementGeneratorController{

  public ID parentId {get;set;}
  public String WordName {get;set;}

  public PageReference saveWord() {

    PageReference pdf = Page.PdfGeneratorTemplate;

    // create the new attachment
    Attachment attach = new Attachment();

    // the contents of the attachment from the pdf
    Blob body;

    try {

        // returns the output of the page as a PDF
        body = pdf.getContent();


    } catch (VisualforceException e) {
        body = Blob.valueOf('Some Text');
    }

    attach.Body =   body;
    // add the user entered name
    attach.Name = WordName ;
    attach.IsPrivate = false;
    // attach the pdf to the account
    attach.ParentId =parentId ; 
    insert attach;

    // send the user to the account to view results
    return new PageReference('/'+parentId);

  }

}
<apex:page standardController="Account"  contentType="application/msword#sfdcsrini.doc" cache="true">

<html xmlns:w="urn:schemas-microsoft-com:office:word">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<body>
<apex:outputText title="Welcome to word"/>
<br/>
<br/>
<apex:pageBlock >
<div style="text-align:left" >
Hello! 
</div>            
</apex:pageBlock>
</body>
</html>
</apex:page>




In my org we utilitze account hierarchy with multiple child accounts to one parent account.  I need a way to update all the child accounts when any one of 6 certian fields is changed on the parent (owner, status, and 4 custom fields (2 checkboxes, 2 look up fields)).  I know the best way to approach this is through a trigger but my experience with this is extremely limited... 

Can someone lend a guiding hand?  It sounds like I need to use trigger.oldMap but not sure how to start.  Even just helping me to set it up would be most helpful...  Thank you!
I wanted to enforce a minimum price on an item and am managing it as a custom setting.  I have a validation rule checking it, but the text of the validation rule is not properly substituting the text of the custom setting variable reference.

Is this even possible?
Hi guys,

So what's happening is that I have two VF pages right now: a login page and an another VF page. Right now, a user can bypass the login page simply by writing the url for the second VF page. Is there any way to redirect the user to the login page if he's not logged in? I have already written the code to verify whether a user is logged in or not for the controller of the 2nd VF page. However, I am not able to redirect him, since that would require me to load the 2nd VF page first.

Thanks a lot!
Hi Folks,

Can someone help me,

Am not able to see the line-by-line code coverage in Developer Console, though am able to see the percentage covered.

Is it a known issue or am doing something wrong.

Please suggest.

Many Thanks,
Uday
  • September 26, 2014
  • Like
  • 0

Hi,


We are trying to use apex:inputField to edit the field body of Standard Object "Question" in a visualforcepage.

Our problem is that the editor which renders with apex:inputField is visible when we look at the visualforce page inside SFDC.

But, it doesn't render when we call this page inside Salesforce site.

We need apex:inputField since we want to give user the ability to upload image while editing the post.

We have given permissions to all fields. 

Can you please help us with this?

  • July 31, 2012
  • Like
  • 0