• siddarth raj
  • NEWBIE
  • 65 Points
  • Member since 2014

  • Chatter
    Feed
  • 1
    Best Answers
  • 1
    Likes Received
  • 4
    Likes Given
  • 14
    Questions
  • 52
    Replies

Is it possible to display only dependent picklist and hide the controller picklist. Normally, when i try to do this, it gives any error.

Is there any work around ?

  • February 25, 2015
  • Like
  • 0
Hello

I have a requirement to generate the csv file and to be downloaded on button click from user. No saving we wanted it just generated and download on the flow.

Could some please help if any one come across of it.

Thanks
Sid
Hi

Can I be helped in writing an SOQL to find the records which created on last 5 th day. Means If I am querying today i.e 8-5-2015 i expect  the result of a record should be actually created on 03-05-2015.

Thnaks
Sid
Hi

100 callouts per transaction is allowed and thats governer limit as well as i know. I think 1  batch process is 1 transaction, hence can we make 100 callouts in one batch process.

Thanks
Sid
Hi all,

In our project integration to the third party, we have one element deliverydatetime expecting in datetime and in the format of 'HHMMSS'.

Can any one have idea how to convert the deliverydatetime into HHMMSS and it should in datetime isntance not an String.

appreaciate any help indeed.

Thanks
Sid


 
Hi All,

I have a requirement before taking it implimentation I woud like to take it for open discussion with you all to find possible better solution. I appreciate all advices and tries to clear any queries on requirment.

Requirement:
we have to recieve a attachment from third party to our force based app, so we will be exposing apex services to recieve. SInce Attachments more likely to be huge (approx 10MB) . We decide to expose a service to receive 1MB attach on each call.  So there will be 2 services,
 First service
SendAttachmentDdetails -- Here they will send us attachment reason, name and in how many parts, some uniqReference
SendAttachmentParts---UniqReference and attachment 

Business Decides:
AttachmentParts service call should recieve all parts specified (in multiple calls) in first service that must be in 15 mins from the first service call where they send us attahment details.If there is any delay or part missing just discard. let remain object as it was.

I would like to get all opinions and to find out the challeges we misht face in implementations.

Wish it would be an interesting for all folks.

Thanks
Sid
we have an object dir has picklist values reason and additional reason
need to create custome page for creating a dir where user should have option to select reason and comments. user should be allowed to add as many rows(records) as wants
Can folks please help me in basing implimentation approach . 

thanks in advance

 
Following is the page

apex:repeat value="{!wrapper.consignments}" var="consignment" id="delivConsignmentList">

                   <apex:pageBlockSection title="Consignment {!consignment.Position__c}" id="delivConsignment">
                     <apex:outputField value="{!consignment.Due__c}" id="delivDue" styleClass="due"/>
and so on
                    <apex:commandButton value=" DIR "  action="{!newdirForConsignment}"  id="btnRaiseDIR" />
</apex:repeat>

This comman button will not an Ajax call it will not rerender rather on button click it just open a  new window with reference to the particular consignment.

As it is repeated button for each consignment how would i identify this button being clicked from particular consignment , mean want id of the consignment on which the button is been clikced to the controller. Any ideas please

Thanks in advance to all
Hi folks

In my requirement, I have a page with the around 25 numbers entry.. for one object creation. All must be +ve numbers. Can I please be given best approach to implement this validation on apex page.

Thanks
Sri
Hi folks

I just got an doubt why we are not given a option of selecting any user belong to a profile for assigned approver of an approval process. I can see that we could add no. of users as approvers why not a we have a selectina a profile saying that any user from that profile allowed to approve it.

Thanks
Hi champs

I Have a page displays a repeat block of consignment and followingly its items. One consignment could have more than 1.

repeat tag placed inside the pageblock with the id for suppose "pb"

one command button inside this repeat does some action after completion of action wanted to rerender the block "pb"  

I am experiencing wierd behaviour on block rerender latest update values are appearing for only items but not for the consignment. If i refresh the whole page,
page loading with the latest values.


What wrong would be the reason for this behaviour.

Please can i be provided any suggestions 

I do not see any stop holder to not supporting html5 in components when supported on apex pages.


Why not element lookup field can be added to the custom settings.
Hi Force devs

Can we lock the record order from the apex code. not from approval process.

Rgrds
SR
Hi

We are using standard Orders Object with 3 additional custome fileds.  And ofcourse we have overridden the order creation page with our own VF page (new button).

My needs
on Orders List view we have Record type views like hub ordes, pen orders  including standard types like All activated orders, All Orders.
List view page has one default column called Action (Edit  del)

I see del invisible for the orders in status of approved. Looks it is standard functionalit.

Can it be possible to do enable or disable "Edit" based on the status of orders using standard salesforce. Want to avoid using VF page. 

I appreaciate  your time 

Hi Force devs

Can we lock the record order from the apex code. not from approval process.

Rgrds
SR
im getting this error please give me the solutuion Thank i advance
------------------------------------------------------------------------------------------------------
Error: Invalid Data. 
Review all error messages below to correct your data.
Apex trigger samedata caused an unexpected exception, contact your administrator: samedata: execution of AfterInsert caused by: System.DmlException: Insert failed. First exception on row 0 with id 0039000001KC02vAAD; first error: INVALID_FIELD_FOR_INSERT_UPDATE, cannot specify Id in an insert call: [Id]: Trigger.samedata: line 22, column 1


trigger samedata on Account (before insert,after insert) 
{
    Account a1=new Account();
    if(trigger.isbefore&&trigger.isinsert)
    {
for(Account a:trigger.new)
{
    a.name='naresh';
    a.phone='9989099890';
    a.email__c='naresh@axa.com';
    a1=a;
}
    } 
    else if(trigger.isafter&&trigger.isinsert)
    {
       list<contact> lc= new list<contact>();
        for(contact c:[select account.name,phone,email from contact where account.id=:a1.id])
        {
            
            lc.add(c);
        }
     insert lc;
    }
}
Hello,

I am trying to create a button that does two things: (1) create record for Custom Object A & (2) take user to Custom Object B list view.

Can this be done with URL hacking or would we need to write Apex?
 
Hello

I have a requirement to generate the csv file and to be downloaded on button click from user. No saving we wanted it just generated and download on the flow.

Could some please help if any one come across of it.

Thanks
Sid
Hi,
Is it possible to create a new detail record everyday of master record using Apex Schedular, as I am new to Apex please suggest me how can i do that?
how to create the new visual page in force.com ide??? getting error while creating new page 
Hi

Can I be helped in writing an SOQL to find the records which created on last 5 th day. Means If I am querying today i.e 8-5-2015 i expect  the result of a record should be actually created on 03-05-2015.

Thnaks
Sid
Hi all,

In our project integration to the third party, we have one element deliverydatetime expecting in datetime and in the format of 'HHMMSS'.

Can any one have idea how to convert the deliverydatetime into HHMMSS and it should in datetime isntance not an String.

appreaciate any help indeed.

Thanks
Sid


 
Hi Everyone, 

I have been trying to create an Apex Controller that will allow users to click a "Send Email" button and have an email alert fire to the current opportunity owner AND all child opportunity owners. I keep getting the following error:

Method does not exist or incorrect signature: [Messaging.SingleEmailMessage].setToAddresses(List<Opportunity>) at line 25 column 4

Can someone explain how I can change the email addresses in my query to a list of String emails?
Public with sharing class Sendemail{

   public Opportunity Opp;
   
   public LIst<Opportunity> Oppty;
   
   public Sendemail(Apexpages.StandardController controller) {
   this.Opp=(Opportunity)controller.getRecord();
   
   }
 
  
 Public void sendEmailFunction(){
 
  
   List<Opportunity> Owners =[Select Owner.Email FROM Opportunity where Id=:opp.id OR Parent_Opportunity__r.Id=:opp.Id];   
   
    
  

   
   Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
  
  
   mail.setToAddresses(Owners);
  


   mail.setReplyTo('myemail@mail.com');
   mail.setSenderDisplayName('My Name');
  mail.setPlainTextBody('A related Opportunity has been won');
  mail.setHtmlBody('A related Opportunity has been won');
   mail.setBccSender(false);
   mail.setUseSignature(false);
  
   //mail.setHtmlBody('<b> This is HTML body </b>' );
   Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
 } 

}

Thanks!
hello every one,

will any body know about the vf pag to water mark . can any one explain the procedure please
Thanks,

 
  • March 30, 2015
  • Like
  • 0

Hi All,

I am getting this error while performing 'Run All Tests'. However, individual test classes works fine. This error is also intermittent. I am not sure how to fix this and why I'm getting this error. Can anyone help?

@future methods are queued.  Are queues single threaded within the same org?

In otherwords, if you have an @future method that mutliple user have the possibility of executing at the same time, will they get into the queue one after another?

thanks
Hi, Account and 'Private_Account_Information have look-up relationship. I want to copy PrivateAccount Information notes to Account notes. PrivateAccount Information have account_name field on it.

List<Notes_List> Noteslist  = new List<Notes_List>();
List<Note> memberList = new List<Note>([SELECT Body,CreatedById,CreatedDate,Id,IsDeleted,IsPrivate,LastModifiedById,LastModifiedDate,OwnerId,ParentId,SystemModstamp,Title FROM Note where parent.type='Private_Account_Information__c']); // getting all the notes
    for(Note source : memberList )
    {
  Note destination = new Note();
        destination.body = source.body;
        destination.ParentId ='001V000000HaOui'; // How to assign private account information.Account name here ??
  destination.IsDeleted = source.IsDeleted;
        destination.Title = source.title;
  destination.IsPrivate = source.IsPrivate;
  destination.OwnerId = source.OwnerId;
  Noteslist.add(destination);
  }
    }
     insert Noteslist; // inserting new notes
I have a Custom object where we have Visual force page button,
The requirement is:
The Object Tab is enabled for Portal Users, If  object record created/Owned by Portal user then only they should be able to access this Visual force page button. If the record is created/Owned by any other users this button should throw error or should be disabled for these portal users. 

Portal User have view all access to this object. Poratl user can only edit that they own/create. The visual force page button does not have any security. I want to create a rule or button in this object to restrict access to portal users if the record is created by someone else beside them. 

How can I achieve this requirement and what will be the syntax.
Hello,

I have a approval process on a opp object. Which checks on some conditions and stage then will go to approval process.

For all this to happen user has to submit for approval, Sometimes there is a chance of him forgetting it.
So can we automate the whole process were it will go to approval process i.e approver verifies accepst or rejects it. Without using apex code can we do it.

Please provide some guidance.

Thanks in Advance.
 
Hi,

Can I display column names in row and data in columns like below

columnname1  value1 value2
columnname2  value1 value2 
columnname3  value1 value2
I am create a new account based on custom object data. I am creating a prospect account record type. I am trying to pass ship to address information but account is not allowing to create. please advice how to create ship to address. 

I am creating account using trigger 
 
* Create Account */
  Account acc = new Account();
  acc.RecordTypeId = AccountRecordTypeID.Id; // Prospect record type
  acc.name = Deal.customer_name__c;
  acc.Industry = Deal.Industry__c;
  acc.Website = Deal.Company_Url__c;
  acc.Type = 'Prospect';                        
  //acc.ShippingStreet =  Deal.Address_Line1__c;
  //acc.ShippingCity = Deal.City__c;
  //acc.ShippingState = Deal.State__c;
  //acc.ShippingPostalCode = Deal.Zip_Postal_Code__c;
  //acc.ShippingCountry = Deal.Country__c;




Thanks
Sudhir
Hi folks,

Could you plz tell me how to add custom vf page as a related list in standard object?
Hello,

I have table displayed in below manner.

test
My usecase is, User will specify the end date.

and if this end date is passed then the text1 should be set to Text2.

I could do it in visualforce page, but I do not want to check this condition everytime a action is taken on page. Is there any visualforce capacity i could use ?
  • March 23, 2015
  • Like
  • 1
Hi guys,
i want to share with you a solution I come up with, to wrap long url when rendering a VF page.
Basically the problem was this:
A customer pasted a very long URL (more than 400 chars) in a Rich Text Area. When rendering the page as PDF, to print it, the URL overflow the page margin, so it wasn't visible at all.

This is the code i come up with
private String addWhiteSpaceInUrlTooLong(String text) {
        // Step 1 - Search anchor links
        Pattern ptn = Pattern.compile('<a[^>]*(>.*?)</a>'); // WATCH OUT! This regex doesn't match nested anchor
        Matcher mch = ptn.matcher(text);
        Integer charPerLine = 50; // A whitespace is inserted each charPerLine chars
        while (mch.find()) {
            String toReplace = mch.group(1);
            String substitute = '';
            Integer len = toReplace.length();

            if (len < charPerLine) //No need to replace
                continue;

            Integer elems; // White space to insert

            if (len / charPerLine == 0)
                elems = len / charPerLine;
            else
                elems = len / charPerLine + 1;

            // Insert white spaces
            for (Integer i = 1; i <= elems; i++) {
                if ((charPerLine * i) < len)
                    substitute += toReplace.substring(charPerLine * (i - 1), charPerLine * i) + ' ';
                else
                    substitute += toReplace.substring(charPerLine * (i - 1), len) + ' ';
            }

            text = text.replace(toReplace, substitute);            
        }

        // Step 2 - Search pasted links
        ptn = Pattern.compile('\\b\\s(https?://\\S.*?)(\\s|$)');
        mch = ptn.matcher(text);
        charPerLine = 60;

        while(mch.find()) {
            String toReplace = mch.group();
            String substitute = '';
            Integer len = toReplace.length();

            if (len < charPerLine)
                continue;

            Integer elems;

            if (len / charPerLine == 0)
                elems = len / charPerLine;
            else
                elems = len / charPerLine + 1;

            // Insert white spaces
            for (Integer i = 1; i <= elems; i++) {
                if ((charPerLine * i) < len)
                    substitute += toReplace.substring(charPerLine * (i - 1), charPerLine * i) + ' ';
                else
                    substitute += toReplace.substring(charPerLine * (i - 1), len) + ' ';
            }

            text = text.replace(toReplace, substitute);
        }

        return text;
    }

You could use like this:
MyCustomObject.richText = addWhiteSpaceInUrlTooLOng(MyCustomObject.richText);
Hope it will be useful ;)
 
Hi.

In the VF I used the date format as YYYY-MM-dd in the 
<apex:outputText value="{0,date,YYYY/MM/dd}">
Before the last week of the year it was OK. When the new year falls in the  last week of Decemeber comes the issue.
For example
2014:
S   M  T  W Th F Sat
28 29 30 31 1   2 3

In the above calendar 1st Jan of 2015 falls in the Thurusday.So when I viewd the records of 28,29,30 of December 2014 It showed as
2015-12-28
2015-12-29
2015-12-30
2015-12-31

After that I came to know that
@"YYYY" is week-based calendar year.
@"yyyy" is ordinary calendar year.
http://realmacsoftware.com/blog/working-with-date-and-time

cheers
suresh



 
Hi All,

Is there any way we can tell from the Controller Extension which button in clicked in the Visualforce Page.

For example in the visualforce page Below:
<apex:page standardController="Account" extensions="AccountExt" >
    <apex:form>
         <apex:commandButton value="X"  action="{!X_AccountExt}"/>
         <apex:commandButton value="Y"  action="{!Y_AccountExt}"/>
     </apex:form>     
</apex:page>



Can we check from the controller extension AccountExt ,which button was clicked by the user.

Thanks
Saurabh
.




Thanks
Saurabh Agrahari