• Rajesh_SFG
  • NEWBIE
  • 25 Points
  • Member since 2011

  • Chatter
    Feed
  • 1
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 15
    Replies

Hi all,

     I want to create the picklist field under the particular object  dynamically.is it possible?

if possible any one can u please give me the sample code.

 

thanks in advance.

anu

  • August 29, 2011
  • Like
  • 0

Hi all,

   I want to deprecate the most recent released version in managed package in Managed-release type. because i want to delete this package completely. but in this version deprecate button always disable status. how to deprecate this..

Hi,

  I have created Managed package. And installed to another developer organization. But there could not fired some triggers in the installed environment. What the exact reason for this...

Hi all

  I have created Visualforce page for PDF usage. I have listed some Rich text values from controller class like given below

<page  standardController="Shipment_Header__c">

<apex:outputText value="{!PackingSlipSignature}"/>

</page>

 

The 'packingSlipSignature'  Return some company address from controller class. This i want dispaly one by one but this  display as given below

CompanyName<br> RK Salai<br> chennai<br> <br>

 

What can i do for this.

Hi,

  

   I need to create the image with dynamic change static resource name tag. 

<apex:image url="{!$Resource.LogoName}" width="650" height="70"/>

 

I want to change the LogoName dynamically from controller class. That mean queried the image name from Static Resource table then pass that value from controller class. how can i do..

Hi all,

  I need to create the validation rule from without relationship objects. i have created one custom object like "DPT_Configuration__c" in such object have 'Request_Quantity__c' field. In this field compare to another object of "Trial__c" field 'Quantity__c'. i have created validation rule on Trial__c custom object. like given below

 

$ObjectType.DPT_Configuration__c.Fields.Request_Quantity__c  <   Quantity__c  &&  Remarks__c  = null

 

but this throw the syntex error : Incorrect parameter for operator '<'. Expected Number, Date, DateTime, received Object

 

How to solve this..

Hi all,

   I retrived some values from Account object using Ajax toolkit scripts. so i able to display those values only the HTML controls like <div>, <b>. but i need to display those values in Visualforce components like datatable or datalist. Is this possible in ajax toolkit.

 

 

Thanks in advance

Hi,

  Can anyone explain use of Ajax toolkit in salesforce with sample code..pls

Hi,

   I have created the two visualforce pages. One is parent page another one is child page. i have to call the child page using IFRAME from parent page. i need action when click on child page button call to parent page javascript function. Actually this javascript function used to close this iframe.

 

Thanks.

Hi all,

  I need to create the validation rule from without relationship objects. i have created one custom object like "DPT_Configuration__c" in such object have 'Request_Quantity__c' field. In this field compare to another object of "Trial__c" field 'Quantity__c'. i have created validation rule on Trial__c custom object. like given below

 

$ObjectType.DPT_Configuration__c.Fields.Request_Quantity__c  <   Quantity__c  &&  Remarks__c  = null

 

but this throw the syntex error : Incorrect parameter for operator '<'. Expected Number, Date, DateTime, received Object

 

How to solve this..

HI there,

 

I have a formula field that reads:

 

CASE(Ownerid,005A0000000123,
"John Smith"& BR()
&"Senior Services Associate"& BR()
&"p:718.111.22222"& BR()
&"e: jsmith@tester.com ",005A0000000456,
"Mary Smith"& BR() 
&"Director of Services"& BR() 
&"p: 718.111.3333"& BR() 
&"e: mary@tester.com", "No owner")

 this works for the email signature, according to the owner of the Lead. The formula displays the values just fine with the paragraphs correctly within salesforce pages. Now, when I use the field in an email template, the result is a lot os <BR> where there was supposed to be just another paragraph.

like:

 

John Smith <BR> Senior Services Associate <br> p: 718.111.2222 <br> e: jophn@tester.com

 

Again, looking at the field in Salesforce, it displays just fine with the page breaks.

 

Thanks!!

B

Greetings,

 

I have 3 record types:

 

1) Record Type A 

2) Record Type B

3) Record Type C

 

Depending on the record type, I'd like do a specific calculation: if record type A, then X*Y.  Exception: if X*Y > 100, then it should show 100, otherwise X*Y.

 

For record type B, the calculation should be X*Y > 80, then show 80, othewerwise X*Y (answer would be less than 80).

 

I have this as my current formula:

 

AND(
  ($RecordType.DeveloperName = "Record Type A"),
  IF(X*Y> 100, 100, X*Y)
   )

 

However I keep getting an error.  I see where the error is coming from because it's not really calculating it with the AND expression.  I feel like this is a simple mistake I'm overlooking.  Can anyone help with the logic?  

 

Thank you x 100! 

Hi,

  

   I need to create the image with dynamic change static resource name tag. 

<apex:image url="{!$Resource.LogoName}" width="650" height="70"/>

 

I want to change the LogoName dynamically from controller class. That mean queried the image name from Static Resource table then pass that value from controller class. how can i do..

Hi all,

  I need to create the validation rule from without relationship objects. i have created one custom object like "DPT_Configuration__c" in such object have 'Request_Quantity__c' field. In this field compare to another object of "Trial__c" field 'Quantity__c'. i have created validation rule on Trial__c custom object. like given below

 

$ObjectType.DPT_Configuration__c.Fields.Request_Quantity__c  <   Quantity__c  &&  Remarks__c  = null

 

but this throw the syntex error : Incorrect parameter for operator '<'. Expected Number, Date, DateTime, received Object

 

How to solve this..

Hi all,

     I want to create the picklist field under the particular object  dynamically.is it possible?

if possible any one can u please give me the sample code.

 

thanks in advance.

anu

  • August 29, 2011
  • Like
  • 0

i have written this code in controller to appent date time 

string parentID ;
string year = String.valueOf(userInputAppointment.Appt_Date__c.year());
string month = String.valueOf(userInputAppointment.Appt_Date__c.month());
string day =  String.valueOf(userInputAppointment.Appt_Date__c.day());
string hour = userInputAppointment.Appt_24_From_Hour__c;
string minute =userInputAppointment.Appt_24_From_Min__c;
string second = '00';
string stringDate = year + '-' + month
 + '-' + day + ' ' + hour + ':' + 
minute + ':' + second;
Datetime startTime= 
   datetime.valueOf(stringDate);
 
test case i have written for it
Appointment__c app1 = new Appointment__c();
       
         app1.account__c=a.id;
         app1.Branch__c=b.id;
         app1.doctor__c=s1.id;
         app1.Appt_AM_PM__c='am';
          app1.Appt_Date__c=date.ValueOf('2011-09-21');
             
        app1.Appt_24_From_Hour__c='11';
        app1.Appt_24_From_Min__c = '60';
         string year = String.valueOf(app1.Appt_Date__c.year());
string month = String.valueOf(app1.Appt_Date__c.month());
string day =  String.valueOf(app1.Appt_Date__c.day());
string hour = app1.Appt_24_From_Hour__c;
string minute =app1.Appt_24_From_Min__c;
string second = '01';
string stringDate = year + '-' + month
 + '-' + day + ' ' + hour + ':' + minute + ':' + second;


Datetime startTime= 
   datetime.valueOf(stringDate);
but i am getting this error 
System.TypeException: Invalid date/time: 2011-9-21 11:null:00
plz help me how to cover the test case for the date part in the controller

 

 

i have a pageblocktable and i have a list of custom objects Offers. I want to make a button where if u click on it. the current offer will be accepted, but the button doesnt work. Ive also tried commandLink and also it doesnt work. i have also used assignTo an that to doesnt work. can anybody help me on this.

<apex:PageBlockTable var="offer" value="{!Offers}">
  <apex:column >
       <apex:facet name="header">Accept</apex:facet>
         <apex:commandButton value ="Accept" action="{!AcceptOffer}">
<apex:param name="q" value="{!offer.Id}"/>
             </apex:commandButton>                               
    </apex:column>
/////controller

public class code{

public List<Offers__c> Offers {set;get}

public class AcceptOffer(){

String aOffer = ApexPages.currentPage().getParameters().get('Id')

}
}

 

Hello

 

This is my first attempt to write javascript for an action button.

 

I want to iterate through a list of Strings (generated by splitting a long comma separated string).

I want to process these Strings in batches equal to Quanta value.

 

Problem is that when I push the button I get this Error:

 

Unexpected token: ILLEGAL

 

This is my code:

 

{!requireScript("/soap/ajax/22.0/connection.js")} 
{!requireScript("/soap/ajax/22.0/apex.js")} 

sforce.debug.trace=true;

var quota = {!$Setup.testtt__Gateway_Setting__c.testtt__Max_Quota__c};
var Id = '{!testtt__Micro_Campaign__c.Id}'
var recipients = {!testtt__Micro_Campaign__c.testtt__Distribution_List__c}.split(',');
var startSlice = 0;
var endSlice = quota;
var silices = 0;
var timeout;

function timedPublish(){
	
	var result;
	
	while(silices < quota){	
		
		result = executePublish(recipients.slice(startSlice, endSlice));
		
		if(result == 0){
			alert(" Messages are being processed and published. This might take time depending on the number of recipients");
			window.location.reload();
		}
		else{
			alert("Some error was found and publishing as stopped. please check the logs.");
		}
		
		startSlice = endSlice++;
		
		if(endSlice <=  recipients.lenght)
			endSlice = i*quota;
		else
			endslice = recipients.lenght;
		
		slices++;
		
		timeout = setTimeout("timedPublish()",2000);	
	}
	
	clearTimeout(timeout);
}
function executePublish(toNumbers){
	return result = sforce.apex.execute( 
					 "testtt/MicroCampaignAPI", // class 
					 "publishCampaign", // method 
					 {campaignID: Id, recipients: toNumbers});     //arguments 		
}

 

Any idea what am I doing wrong?

 

Many Thanks


  • August 11, 2011
  • Like
  • 0



I have a Master - Detail Relationship. I dont want duplicate records in Master field. I placed a trigger (insert, update) which doesn't allow duplicate entry into the database.

Now when i update the detail field the trigger on master gets executed and it prevents me to insert data displaying that the record that i am entering is duplicate. I inferred that the update trigger gets executed even when i am entering detail record values. I dont want this to happen.

Can anyone suggest a solution of how to prevent the trigger from executing when i am entering data in the detail field.
  • August 11, 2011
  • Like
  • 0

Hi,


I've a custom "Existing_Industry__c" object which is a child object of Account (master-detail).
This object has a custom field which name is "Industry__c" which is a lookup field of another object. The value available for this field are :
- Industry 1,
- Industry 2,
- Industry 3.
I've created another custom object "Existing_Industry_Equipment__c" which is a child object of "Existing_Industry__c" (master-detail).
This object has a custom field which name is "Equipment__c" which is a lookup field of another object. The value available for this field are :
- Equipment 11 for Industry 1,
- Equipment 12 for Industry 1,
- Equipment 21 for Industry 2,
- Equipment 22 for Industry 2,
- ...
This is like dependent picklist ... 
For example, I add "Industry 1" on the related list "Existing Industry" to "Account 1" .
On "Industry 1" record I would like to add Equipment on the relatd list "Existing Industry Equipment" which only display "Equipment 11" and "Equipment 12".
I try to add a filter on the lookup "Equipment__c" (Existing_Industry_Equipment__c) but I can't filter on the "Industry__c" parent field (Existing_Industry__c).

Any ideas ???

Thanks

I have a picklist status field ,the field contains postponed,scheduled ,canceled values . when i select postponed value ,the custom date field should be made activate ,in other cases it should be inactive.

Hi Frnds,

 

How can I change the standard color of Force.com Standard UI Header and Image?

Please help

 

Regards

Raj