• Yashavant
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 8
    Replies
Hi,

I applied one validation rule to custom object but facing some problem. That custom object contain two lookup fields LP_Field1 & LP_Field2.

Validation rule is as below:
Code:
Rule Name Agent_not_null Active Checked
Namespace Prefix airlines Error Location Agent
Error Condition Formula : ISNULL( VALUE( LP_Field1__c ) )
Error Message Agent Field cannot be null
Description
Created By Airlines psl, 1/16/2009 3:09 AM Modified By Airlines psl, 1/19/2009 8:26 PM

 When i didnt provide value for LP_Field1 then it showing the error message as 'Agent Field cannot be null', but when i provide the value then it showing error as
Validation Formula "Agent_not_null" Invalid (null)
Any pointer on this will be helpful.

Yash
 

 
Hi,
I am getting JSON array as a response from webservice call and i want to parse that response in apex class.

Any pointer on this will be helpful.

Thanks
Yash

HI,
I am calling one web service and getting response in XML and while iterating through that XML i got below exception

System.XmlException: ParseError at [row,col]:[1,1] Message: Content is not allowed in prolog.

Code:
 HttpRequest req = new HttpRequest();
        String url='abaccc';

        req.setEndpoint(url);
        req.setMethod('GET');
        // Send the request, and return a response
        HttpResponse res = h.send(req);
        XmlStreamReader reader = res.getXmlStreamReader();
        // Read through the XML
        while(reader.hasNext()) {
            System.debug('Event Type:' + reader.getEventType());
            if (reader.getEventType() == XmlTag.START_ELEMENT) {
            System.debug('Local name :'+reader.getLocalName());
            }
            reader.next();// Getting exception at this line.
        }

 Can anybody help me?

Thanks
Yash

HI,


Code:
<apex:repeat value="{!valuesForPageNumber}" var="page" id="theRepeat" >
        <apex:commandLink value="" onClick="setLink({!page})" action="{!paginationLink}" >
              <apex:outputText value="{!page}" styleClass="{!buttonStyleClass}"/>
        </apex:commandLink>&nbsp;&nbsp;
</apex:repeat>

 
Suppose, i displayed 1-10 commandLink and i can apply style to that group. But if i want change the style of particular commandLink from group of (10) commandLink, how to achieve it?

In short, i want to changed the style of particular commandLink within group depending on condition.


Yash
Hi,

I have displayed the total available pages with help of 'commandLink' and on the 'Click' event of that i am displaying the records of that page.

Now, i want to apply particular color to that commandLink which is 'clicked' by the user so as to differentiate from others.

Code is as follow. Any pointers on this will be helpful.

Code:
<apex:repeat value="{!valuesForPageNumber}" var="page" id="theRepeat" >
    <apex:commandLink value="" onClick="setLink({!page})" action="{!paginationLink}" >
           <apex:outputText value="{!page}"/>
    </apex:commandLink>&nbsp;&nbsp;
</apex:repeat>

 

Yash
Hi,

I want to retrieve the error message if sendEmail failed.

Code:
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
// Strings to hold the email addresses to which you are sending the email.
String[] toAddresses = new String[] {'user@acme.com'};
String[] ccAddresses = new String[] {'smith@gmail.com'};
// Assign the addresses for the To and CC lists to the mail object.
mail.setToAddresses(toAddresses);
mail.setCcAddresses(ccAddresses);
// Specify the address used when the recipients reply to the email.
mail.setReplyTo('support@acme.com');
// Specify the name used as the display name.
mail.setSenderDisplayName('Salesforce Support');
// Specify the subject line for your email address.
mail.setSubject('New Case Created : ' + case.Id);
// Set to True if you want to BCC yourself on the email.
mail.setBccSender(false);
// Optionally append the salesforce.com email signature to the email.
// The email address of the user executing the Apex Code will be used.
mail.setUseSignature(false);
// Specify the text content of the email.
mail.setPlainTextBody('Your Case: ' + case.Id +' has been created');
mail.setHtmlBody('Your case:<b> ' + case.Id +' </b>has been created<p>'+
' View case <a href=https://prerelna1.pre.salesforce.com/'+case.Id+'>click here</a>');
// Send the email you have created.
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });

Any pointer on this will be helpful.


Yash
 

Hi,

I am getting invalid session id for following code:

I have called Parent Window: updateRecord() function from child window.

Code:
<apex:page >
<HTML><HEAD><script src="/soap/ajax/14.0/connection.js"></script><script src="/soap/ajax/14.0/apex.js"></script>
 </HEAD>
<SCRIPT LANGUAGE="JavaScript">
    function openChild(file,window1) {
        var childWindow=window.open('','name','height=400,width=500');
        if (childWindow.opener == null){ 
            childWindow.opener = self;
        }else{
            childWindow.document.write('<FORM NAME="childForm"  >');
            childWindow.document.write('<BR>To      :<INPUT NAME="cf1To" TYPE="TEXT" VALUE="" size="60">');
            childWindow.document.write('<BR>CC      :<INPUT NAME="cf2Cc" TYPE="TEXT" VALUE="" size="60">');
            childWindow.document.write('<BR>Subject :<INPUT NAME="cf3Subject" TYPE="TEXT" VALUE="" size="60">');
            childWindow.document.write('<BR><INPUT TYPE="button" VALUE="Submit" onClick="javascript:{alert(\'hi\');alert(\'Cf1To :\'+document.childForm.cf1To.value);;opener.document.parentForm.pf1.value = document.childForm.cf1To.value; window.opener.updateRecord();self.close();return false;}">');
            childWindow.document.write('</FORM>');
            childWindow.document.childForm.cf1To.value='yashavant_b@abc.in';
            childWindow.document.childForm.cf2Cc.value='manjiri_y@abc.co.in';
            childWindow.document.childForm.cf3Subject.value='Confirmation';
        }
     }
     function updateRecord(){
        try{
            var success = sforce.apex.execute('EmailTestWebServiceClass','updateEmailTest',{a:'abc'}); 
        }catch(e){
            alert('Exception='+e);
        }
     }
</SCRIPT>

<BODY>
<FORM NAME="parentForm">
<INPUT TYPE="button" VALUE="Open child" onClick="openChild('examplejs2.html','win2')">
<BR><INPUT NAME="pf1" TYPE="hidden" VALUE="">
<BR><INPUT NAME="pf2" TYPE="TEXT" VALUE="">
</FORM>
</BODY></HTML>

</apex:page>

 Any pointer on this will be helpful.

Yash

Hi,

I want to open new popup window in current visualforce page and retrieve some data from custom object and display on that new popup window. After user interruption , i want to store the result back to custom object.

Can anybody provide me pointers on this?


Thank you very much in advance.


Yash
hi,

I want the Force.com connect offline for lotus notes.

Any pointer about this will be helpful

Regards
Yash
hi,

how to call connectbeam api from an apex class.

Any pointer on this would be highly appreciated.


Thanks
Yash
Hi,

I want to do salesforce certification Dev 401 and DEV 501. We are partners of Salesforce, so can anybody tell me the exact price of the certification ?

Any pointers on these is highly appreciated.

Thank You,
Yash
Hi,

I want to do salesforce certification Dev 401 and DEV 501. We are partners of Salesforce, so can anybody tell me the exact price of the certification ?

Any pointers on these is highly appreciated.

Thank You,
Yash
Hi,
I am getting JSON array as a response from webservice call and i want to parse that response in apex class.

Any pointer on this will be helpful.

Thanks
Yash

HI,


Code:
<apex:repeat value="{!valuesForPageNumber}" var="page" id="theRepeat" >
        <apex:commandLink value="" onClick="setLink({!page})" action="{!paginationLink}" >
              <apex:outputText value="{!page}" styleClass="{!buttonStyleClass}"/>
        </apex:commandLink>&nbsp;&nbsp;
</apex:repeat>

 
Suppose, i displayed 1-10 commandLink and i can apply style to that group. But if i want change the style of particular commandLink from group of (10) commandLink, how to achieve it?

In short, i want to changed the style of particular commandLink within group depending on condition.


Yash
Hi,

I want to open new popup window in current visualforce page and retrieve some data from custom object and display on that new popup window. After user interruption , i want to store the result back to custom object.

Can anybody provide me pointers on this?


Thank you very much in advance.


Yash
Hi,

I want to do salesforce certification Dev 401 and DEV 501. We are partners of Salesforce, so can anybody tell me the exact price of the certification ?

Any pointers on these is highly appreciated.

Thank You,
Yash
Hi,

I want to do salesforce certification Dev 401 and DEV 501. We are partners of Salesforce, so can anybody tell me the exact price of the certification ?

Any pointers on these is highly appreciated.

Thank You,
Yash