• sami ami
  • NEWBIE
  • 55 Points
  • Member since 2013

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 19
    Questions
  • 28
    Replies
Hi,
I need help to write validation rule for contact number as it should accept only numbers not text and any other characters...thanks in advance.
Hi,
I need help to write validation rule for contact number as it should accept only numbers not text and any other characters...thanks in advance.

Hi,

 

I want to make a checkbox true if my contact time zone is between something.

So i created a timezone field (formula field to set time zone based on State) on my contact and specified some timeranges in my custm setting.So i made custom list variable.

Now i want to make my checkbox true if my contact.timezone is between my global list timezone.range1 and range2

I am not understanding how to write formula for this.Any help??

 

Thanks in advance.!!

Can i set SOQL order by values in custom settings or somewhere in my org...where admin can change it?rather than in my apex class??

Hi,

 

I have a custom object which has attachments.

I want to take the recent attachment and copy that link on to my record (custom field).

How can i do that??

 

 

Hi,

 

I am getting this error when I make REST calls .

System.AsyncException: Future method cannot be called from a future or batch method: Myfutureclass.method(LIST<Id>)

This is a trigger which calls that class which has future method and calls REST calls.

 

trigger checkcase on Case (after insert,after update) {
List<Id> caseIds = new List<Id>();
for(Case c : Trigger.New)
{
if(c.Checkbox__c)
{
caseIds.add(c.Id);
System.debug('*********Caseid'+CaseIds);
}
}
System.debug('***********Trigger.new'+trigger.new);
System.debug('***********Trigger.old'+trigger.old);
if(caseIds.size() > 0){
if(Trigger.isinsert){
Myfutureclass.method(caseIds);
}
if(trigger.isUpdate ){
if(trigger.old[0].Checkbox__c){
Myfutureclass.method(caseIds);
}
}
}
}

 

Please correct me what i am missing??Please

I have a custom button which does some functionality when clicked.I want that click to happen automatically when the status is changed to closed.

 

My thoughts:

 

1.Thought of some trigger which will fire when status is changed to closed.But not sure how invoke that button which is on detail page.

 

2.Overriding save button.But status is closed then call my apex class(that is what button does now and generates a PDF)

Not sure how to implement them.Any suggestions or new ideas??

 

 

hi

 

I have a trigger which will be fired under some condition.

It works perfect and fine if i just give insert.

If i also include update,I get error :

How can i get ride of this?

please help

System.AsyncException: Future method cannot be called from a future or batch method

Hi,

 

I  need a trigger when account owner changes,my customobject owner(Look up relationship) also changes .

 

Trigger updateowner on Account (after insert,after update) {

    set<Id> setOfAccoutOwnerChanged = new set<Id>();
    for(Account a : Trigger.new){
    if(a.OwnerId != Trigger.oldMap.get(a.Id).OwnerId)
    setOfAccoutOwnerChanged.add(a.Id);
    }
    if(!setOfAccoutOwnerChanged.isEmpty()) {
    List<Customobject__c> listOfCandidatesToUpdate = new List<Customobject__c>();
    
    Map<Id,Account> accountMap = new Map<Id,Account>();
//It error at this line.   
accountmap=[SELECT ID,OwnerId,(Select id,name,ownerid from Customobject__c) FROM Account WHERE Id =:setOfAccoutOwnerChanged]; } }

 

I am failing with my SOQL query...What am i missing.I feel this is similar to account-contact 

Hi,

 

I am trying to get lead fields in to my task which is associated with lead.

I created a formula field and tried whoId(gets my lead)

whoid.email(error)   any idea on how to get that?

 

Just ran into a very confusing error.
We have an application which makes API calls to Salesforce - specifically a POST method which uploads cases . This is working fine sandbox environment. But I get Internal server error in production.

I have everything similar in sandbox and production and is very weird to get this error.

 

Any pointers??

Hi

 

I am trying to query my endpoint from custom setting in my RESTFULL call.

I created a object and a customfield in custom setting and made it public.

I gave my endpoint in that customfield(asdefaultvalue).

In my apex class Icreated a list and trying to query that field from that object.

But Iam getting nullvalue. Please help if I am missing something.

 

Hi,

 

I am trying to parse an email with some string methods.

My email looks something like this.

 

 

Case # 00001234 has been updated.

 

Status is changed to In progress from New.

 

----------------------------------------

 

 

----------------------------------------

 

 

 

I am trying to capture above part (Status is changed to In progress from New.)

How can I do that?Any help?

Hi,

 

I am having a response in XML format.I am trying to get hold of particular fied value in my response XML and save in my field on salesforce object.

I am getting my body by response.getbody();

So I am trying to parse this XML file and get my ID value and fill my field..How can I do this??Any help??

 

 


<?XML version="1.0" encoding="UTF-8"?>
<case>
<id>00000000ABBl</id>
<subject>test</subject>
<Description>test</Description>
</case>

Hi...

 

I am having an REST URI of my client and i need to make some call outs to that from salesforce and POST some data...How can i do that?Its an integration between two orgs(salesforce and another third party tool)

 

Thanks,

Ramesh

Hi.

 

I created a email template.For now i hardcoded my from address.But i want the from address should be logged in user.

So how can i do this possible??

I want to give my from address as 

from:loggedin username  <loggedin user email>

 

Please suggest.

 

Hi 

I am trying to making some call outs from salesforce.I am new to this.Can some1 guide me??

 

I hope i am on correct way.My Use case is:

I am doing integration with a tool which is a bug tracking tool.

So when ever a case is created in salesforce and some conditions are met..It will create a issue/record  in my tool.

This is the use case.So for this i need to make some callouts from apex..which calls my tool and logins inside and creates a record.(This is my understanding not sure if i am correct)

Please correct me if i am wrong.

 

Thanks

I am new to integration and trying to understand this.I am working an integration of a tool to salesforce.

So when some case is created and certain conditions are met in salesforce then a record should be created in my third party tool.

I dont find anything in that tool except REST API token.So i need to use that and make REST calls to that tool to login and create records in that.I generated consumer Id and key.

 

Can some experts guide me through the process of making REST calls from apex code to login in to that and create record.I am confused about all these and have no way infront!!!!

 

 

I am trying to create a rule.This is my criteria:

 

I have a field on Opportunity which will change with workflow or either admin CAN only change.I need a rule so that other users can't update that field.

 

How can I say that admin and workflow can change the field but not other users..Please help!!

Hi,

 

I want to make a checkbox true if my contact time zone is between something.

So i created a timezone field (formula field to set time zone based on State) on my contact and specified some timeranges in my custm setting.So i made custom list variable.

Now i want to make my checkbox true if my contact.timezone is between my global list timezone.range1 and range2

I am not understanding how to write formula for this.Any help??

 

Thanks in advance.!!

Can i set SOQL order by values in custom settings or somewhere in my org...where admin can change it?rather than in my apex class??

Hi,

 

I have a custom object which has attachments.

I want to take the recent attachment and copy that link on to my record (custom field).

How can i do that??

 

 

Hi,

 

I am getting this error when I make REST calls .

System.AsyncException: Future method cannot be called from a future or batch method: Myfutureclass.method(LIST<Id>)

This is a trigger which calls that class which has future method and calls REST calls.

 

trigger checkcase on Case (after insert,after update) {
List<Id> caseIds = new List<Id>();
for(Case c : Trigger.New)
{
if(c.Checkbox__c)
{
caseIds.add(c.Id);
System.debug('*********Caseid'+CaseIds);
}
}
System.debug('***********Trigger.new'+trigger.new);
System.debug('***********Trigger.old'+trigger.old);
if(caseIds.size() > 0){
if(Trigger.isinsert){
Myfutureclass.method(caseIds);
}
if(trigger.isUpdate ){
if(trigger.old[0].Checkbox__c){
Myfutureclass.method(caseIds);
}
}
}
}

 

Please correct me what i am missing??Please

I have a custom button which does some functionality when clicked.I want that click to happen automatically when the status is changed to closed.

 

My thoughts:

 

1.Thought of some trigger which will fire when status is changed to closed.But not sure how invoke that button which is on detail page.

 

2.Overriding save button.But status is closed then call my apex class(that is what button does now and generates a PDF)

Not sure how to implement them.Any suggestions or new ideas??

 

 

hi

 

I have a trigger which will be fired under some condition.

It works perfect and fine if i just give insert.

If i also include update,I get error :

How can i get ride of this?

please help

System.AsyncException: Future method cannot be called from a future or batch method

Hi,

 

I  need a trigger when account owner changes,my customobject owner(Look up relationship) also changes .

 

Trigger updateowner on Account (after insert,after update) {

    set<Id> setOfAccoutOwnerChanged = new set<Id>();
    for(Account a : Trigger.new){
    if(a.OwnerId != Trigger.oldMap.get(a.Id).OwnerId)
    setOfAccoutOwnerChanged.add(a.Id);
    }
    if(!setOfAccoutOwnerChanged.isEmpty()) {
    List<Customobject__c> listOfCandidatesToUpdate = new List<Customobject__c>();
    
    Map<Id,Account> accountMap = new Map<Id,Account>();
//It error at this line.   
accountmap=[SELECT ID,OwnerId,(Select id,name,ownerid from Customobject__c) FROM Account WHERE Id =:setOfAccoutOwnerChanged]; } }

 

I am failing with my SOQL query...What am i missing.I feel this is similar to account-contact 

Just ran into a very confusing error.
We have an application which makes API calls to Salesforce - specifically a POST method which uploads cases . This is working fine sandbox environment. But I get Internal server error in production.

I have everything similar in sandbox and production and is very weird to get this error.

 

Any pointers??

Hi

 

I am trying to query my endpoint from custom setting in my RESTFULL call.

I created a object and a customfield in custom setting and made it public.

I gave my endpoint in that customfield(asdefaultvalue).

In my apex class Icreated a list and trying to query that field from that object.

But Iam getting nullvalue. Please help if I am missing something.

 

Hi,

 

I am having a response in XML format.I am trying to get hold of particular fied value in my response XML and save in my field on salesforce object.

I am getting my body by response.getbody();

So I am trying to parse this XML file and get my ID value and fill my field..How can I do this??Any help??

 

 


<?XML version="1.0" encoding="UTF-8"?>
<case>
<id>00000000ABBl</id>
<subject>test</subject>
<Description>test</Description>
</case>