• RoyGilad
  • NEWBIE
  • 410 Points
  • Member since 2010
  • Leader
  • Israel DUG


  • Chatter
    Feed
  • 14
    Best Answers
  • 1
    Likes Received
  • 1
    Likes Given
  • 12
    Questions
  • 86
    Replies

Hi There,

 

I am having a URL which should auto populate the Account, Opportunity  and other object value called xxxxObject name on Case object.

 

below is the url 

 

/setup/ui/recordtypeselect.jsp?ent=Case&retURL=%2F{!Opportunity.AccountId}&save_new_url=%2F500%2Fe%3FretURL%3D%252F{!Opportunity.AccountId}%26def_account_id%3D{!Opportunity.AccountId}&CF00N30000009pICP={!Opportunity.Name}&CF00N30000009pICP_lkid={!Opportunity.Id}&CF00Ne0000000Wuu9={!Enrol_Event__c.Name}&CF00Ne0000000Wuu9_lkid={!Enrol_Event__c.Id}

 

It is populating Account,Opportunity but not EnrollmentEvent.

 

it works in dev box , but it is not working in Test environment , i am not understanding what's wrong with above url.

Please suggest me why I am unable to populate the enrollmenteventname.

As I am new to Apex and salesforce, someone told me that I need to write test class for each class that I have written and test them.

 

If I don't have test class, I can't move to production.

 

Is that correct?

 

Why do I need to write test class for each class I have written? Actually, sometimes it is so troublesome as I need to write even a new class to call to external end point. Even though my actual method has been working and already tested to call to end point, when I wirte test calss, it won't allow me to call http method directly and need to even create new class as Mock.

 

As someone scaring me , if I don't finish test class, I can't move my code to production.

 

Any helpful link or useful explanation will be so much appreaciated.

We have our system setup so that when a case has been created by email-to-case, an email is sent to our customer informing  them we have received the case.  This email includes the reference number, so when the customer sends any followup emails, the email will correctly show up on the existing case and not create another case.  This works great.

 

However, how do I notify the case owner that the customer has sent a reply to an existing case when the email is received?

 

Thanks

  • June 07, 2013
  • Like
  • 0

Hi ,

 

How achieve this. 

 

On an account page, show a button 'Opportunity Pipeline'. When clicked, this button should show a chart with opportunity values at account level for the next calendar year. It may also have two controls (start, end) to manage the time period covered in the chart

 

please suggest me.

 

Thanks,

sarvesh.

 

Greetings!

 

I wish it purchase one more user license of type "Salesforce" to my current Salesforce Developer Edition account.

 

Is this possible and how?

 

Thanks in advance!

I'm intending to build a web app in force.com. 

 

I will be using custom objects only (will NOT be using the standard account, contact etc. objects of salesforce).

 

The UI I have in mind is nothing like the default salesforce UI (with a tab for each object). The UI I have in mind will have a lot of images, javascript graphs etc. basically, heavily driven by javascript. 

 

The first question I have and finding difficult to find an answer to, is, IS THIS POSSIBLE in force.com?

 

If possible, can you please send me a link to a video/tutorial for the same?

 

 

-Shri

 

Cna we deploy only page layout in production using change set.....!

I have an approval process on an objects . Is it possible to write Time based workflow rules to send email notifications everyday  reminding the approver to approve.

  • November 12, 2012
  • Like
  • 0

Hi the below code is assinging the case to the loged in user . It works fine when the detail button is created with the javascript code but its not working when the list button is created with the same code[It will enter the else loop].

 

{!REQUIRESCRIPT("/soap/ajax/13.0/connection.js")} 

var caseid = "{!Case.Id}"; 
var userid = "{!$User.Id}"; 
var CaseToUpdate = new sforce.SObject("Case"); 
CaseToUpdate.set("Id", caseid); 
CaseToUpdate.set("OwnerId", userid); 
var Result = sforce.connection.update([CaseToUpdate]); 
if(Result[0].getBoolean("success")) 

function redirect() { parent.frames.location.replace("/{!Case.Id}"); } 
redirect(); 

else { 
alert("Error"); 
}

 

 

 

Please help me on this

Thanks

Hello

 

I've created a trigger to create a case comment whenever a new case is created (either manually or via the Self-Service Portal).

Comment is created from the case description

 

trigger TaskSubTrigger on Case (after insert) {

List<CaseComment> NewComment = new List<CaseComment>();
    
    for(Case ca: Trigger.new){
        
        CaseComment com = new CaseComment();
        com.ParentId = ca.id;
        com.CommentBody= ca.Description;
        NewComment.add(com) ;

                            }

Insert NewComment;

}

 1. Will it fail on bulk import?

 2. When I create case manually with description field empty, a case comment is created empty...any way to avoid this??

 

Thanks in advance!

 

Itay

 

Hi,

 

I have a scheduled job which fires 2 chatter batch jobs. Both use the same opportunity and try to insert in to chatter "FeedItem" table separately.

 

I am getting below issue:

 

Failed to process batch for class 'OpportunityChatterBatchJob1' for job id '707C000000Id6tz'

 

caused by: System.DmlException: Insert failed. First exception on row 0; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record: []

 

 

I am thinking the issue could be because both batch jobs are trying to use same opportunity id for their feeds.

 

I cannot fire these jobs separately because for that I have to create an extra scheduled job.

 

Please let me know if my analysis of the issue is correct. 

Is there any alternative to stop this error from occuring in the case of 2 batch jobs scheduled at same time?

or having an extra scheduled job is the only alternative?

 

Thanks,

Babu.

  • October 10, 2012
  • Like
  • 0

Hi,

 

I have few batch jobs and they can act on same record.

Currently I am scheduling through through different scheduled jobs. They are working fine.

As there cannot be more than 5 scheduled jobs running at at point. I wanted to combine mutiple batch jobs in to one scheduled job.

Please let me know if any one can help me out on this.

 

Thanks

JBabu.

 

 

  • May 30, 2012
  • Like
  • 0
Hi,
We have a Test class the query a Master record deatils and get nulls only in the test class, in "real" run (via annanumence code run)  - it does get values.

Any idea?

Code:
Success__c suc = (Success__c)SmartFactory.createSObject('Success__c');
suc.Account__c=acc.Id;
suc.Opportunity__c=opp.Id;
User successOwner=[select Id,LastName,IsActive from User where UserRole.Name like '%CSM%' and IsActive=true limit 1];
system.debug('Tal Carmi emvcsmic successOwner: '+successOwner);
suc.OwnerId=successOwner.Id;
insert suc;
        
suc=[select Id,OwnerId,Owner.LastName,Owner.IsActive from Success__c where Id=:suc.Id];
system.assertEquals(successOwner.Id,suc.OwnerId);
        
system.debug('Tal Carmi emvcsmic suc: '+suc);
system.debug('Tal Carmi emvcsmic suc.OwnerId: '+suc.OwnerId);
system.debug('Tal Carmi emvcsmic suc.Owner.LastName: '+suc.Owner.LastName);
system.debug('Tal Carmi emvcsmic suc.Owner.IsActive: '+suc.Owner.IsActive);
Log (in test class run):
User-added image
Hi all, 
In Salesforce Console, I'm trying to capture when the user is changing his focus on things, and having a but of a hard time.

In the documentation there is a methud about how to identify sub-tab Focus changes however I could not find how to do that on Primary tabs.

Any idea? 

I tried to addEventListener  on sforce.console.onEnclosingTabRefresh and it didn't work..

Thanks

 
Managed package question!
I have a simple code that works outside the managed package (MP), but when I put it inside the MP it just gives me the objects within the package, and not all of the org's objects:
Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
                    Map<string, string> sObjectNameToLabel = new Map<string, string> ();
                    
                    for(Schema.SObjectType d : schemaMap.values())
                    {
                        Schema.DescribeSObjectResult ds = d.getDescribe();
                        sObjectNameToLabel.put(ds.getName(),ds.getLabel());
                    }
Any ideas?
Hi,
How do I build a VVF page URL in Lightning?
e.g.  - in classic I would build a url like "/apex/myVisualforce?myvar=1"
what would be the the URL in LEX (without building a redirect that slows things down.. ;) )?

 
Hi all, 
when I write:
string ans  = string.valueOf(getUserdata(UserInfo.getUserId()));     
return ans;
and when i print to the screen the data I'm getting partial info with '...' at the end.

Anyway I can the entire answer?
 
Hi Community,
I building a table in VF and I'm using repeat to build it, when doing it I'm getting the values with no problem however the Headers don't apper

My vf is:
<apex:pageBlock >
<apex:pageblocktable id="SLACube" value="{!KPICube}" var="record" rendered="true">

<apex:column >
<apex:facet name="header">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</apex:facet>
<apex:outputText value="{!record.UserName}" />
</apex:column>

<apex:repeat value="{!record.amountPerScore}" var="key">
<apex:column >
<apex:facet name="header"># of {!key}</apex:facet>
<apex:outputText value="{!record.amountPerScore[key]}" />
</apex:column>
</apex:repeat>

</apex:pageblocktable>
</apex:pageBlock>

Any idea how to solve it?

Thanks!
We have a VF page that has the code from this articale (https://developer.salesforce.com/docs/atlas.en-us.salesforce1.meta/salesforce1/vf_dev_best_practices_pages_multipurpose.htm) to manage if the code runs on SF1 or desktop.
Since we do create sforce instace for JS work the if as apper in the articale generates an error 
if( (typeof sforce != 'undefined') && (sforce != null) ) {
    // Salesforce1 navigation
}
Does anyone knows why Salesforce whould think that sforce is only found in SF1?
Wouldn't it be more currect to have it :
if( (typeof sforce != 'undefined') && (sforce != null) && (sforce.one) ) {
    // Salesforce1 navigation
}
To make sure there is a sforce.one instance?

Thanks
 

Hi All,

I am trying to run a report from apex and get the JSON response I've looked the the documentation but I can see how to get the data from out-side the system but I can't find how to run the report from within Salesforce,

 

Please help,

Thank you,

Roy

 

Link to the documentation:

http://www.salesforce.com/us/developer/docs/api_analytics/index.htm

 

 

Hi All,

I created a JS that changes the "Setup" button for specific users.

Iused a sidebar component, and I works great except when the user enters the console, there is no sidebar, and the button is shown because the JS is not loaded.

Can anyone suggest how to run JS in salesforce console?

Thank you,

Hi All,

Does anyone know how can I deploy from Sandbox to production?

I searched Change-Sets and tried to use Eclipse and even the meta-data API but could not deploy it to production.

Does any one know how to deploy assignment rule?

 

Thank you for your help,

Hi All,

Does anyone know how can I deploy from Sandbox to production?

I searched Change-Sets and tried to use Eclipse and even the meta-data API but could not deploy it to production.

Does any one know how to deploy assignment rule?

 

Thank you for your help,

 

Our org. need is that after editing a record, to show the record next in queue.
Is there a way the set the Save URL as:
"
saveURL='/apex/

CostumObject__cRedirectPage?id='+CostumObject__c.id
"
without overriding the edit button?

The reason for this is that when we override the edit button (I create a page for it named: 'CostumObject__c_OverrideEdit' ) the inline edit feature is disabled, which we need.

Please advise, Thank you
Roy
We have a VF page that has the code from this articale (https://developer.salesforce.com/docs/atlas.en-us.salesforce1.meta/salesforce1/vf_dev_best_practices_pages_multipurpose.htm) to manage if the code runs on SF1 or desktop.
Since we do create sforce instace for JS work the if as apper in the articale generates an error 
if( (typeof sforce != 'undefined') && (sforce != null) ) {
    // Salesforce1 navigation
}
Does anyone knows why Salesforce whould think that sforce is only found in SF1?
Wouldn't it be more currect to have it :
if( (typeof sforce != 'undefined') && (sforce != null) && (sforce.one) ) {
    // Salesforce1 navigation
}
To make sure there is a sforce.one instance?

Thanks
 
Hi,
We have a Test class the query a Master record deatils and get nulls only in the test class, in "real" run (via annanumence code run)  - it does get values.

Any idea?

Code:
Success__c suc = (Success__c)SmartFactory.createSObject('Success__c');
suc.Account__c=acc.Id;
suc.Opportunity__c=opp.Id;
User successOwner=[select Id,LastName,IsActive from User where UserRole.Name like '%CSM%' and IsActive=true limit 1];
system.debug('Tal Carmi emvcsmic successOwner: '+successOwner);
suc.OwnerId=successOwner.Id;
insert suc;
        
suc=[select Id,OwnerId,Owner.LastName,Owner.IsActive from Success__c where Id=:suc.Id];
system.assertEquals(successOwner.Id,suc.OwnerId);
        
system.debug('Tal Carmi emvcsmic suc: '+suc);
system.debug('Tal Carmi emvcsmic suc.OwnerId: '+suc.OwnerId);
system.debug('Tal Carmi emvcsmic suc.Owner.LastName: '+suc.Owner.LastName);
system.debug('Tal Carmi emvcsmic suc.Owner.IsActive: '+suc.Owner.IsActive);
Log (in test class run):
User-added image
Managed package question!
I have a simple code that works outside the managed package (MP), but when I put it inside the MP it just gives me the objects within the package, and not all of the org's objects:
Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
                    Map<string, string> sObjectNameToLabel = new Map<string, string> ();
                    
                    for(Schema.SObjectType d : schemaMap.values())
                    {
                        Schema.DescribeSObjectResult ds = d.getDescribe();
                        sObjectNameToLabel.put(ds.getName(),ds.getLabel());
                    }
Any ideas?
Hi Community,
I building a table in VF and I'm using repeat to build it, when doing it I'm getting the values with no problem however the Headers don't apper

My vf is:
<apex:pageBlock >
<apex:pageblocktable id="SLACube" value="{!KPICube}" var="record" rendered="true">

<apex:column >
<apex:facet name="header">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</apex:facet>
<apex:outputText value="{!record.UserName}" />
</apex:column>

<apex:repeat value="{!record.amountPerScore}" var="key">
<apex:column >
<apex:facet name="header"># of {!key}</apex:facet>
<apex:outputText value="{!record.amountPerScore[key]}" />
</apex:column>
</apex:repeat>

</apex:pageblocktable>
</apex:pageBlock>

Any idea how to solve it?

Thanks!
We have a VF page that has the code from this articale (https://developer.salesforce.com/docs/atlas.en-us.salesforce1.meta/salesforce1/vf_dev_best_practices_pages_multipurpose.htm) to manage if the code runs on SF1 or desktop.
Since we do create sforce instace for JS work the if as apper in the articale generates an error 
if( (typeof sforce != 'undefined') && (sforce != null) ) {
    // Salesforce1 navigation
}
Does anyone knows why Salesforce whould think that sforce is only found in SF1?
Wouldn't it be more currect to have it :
if( (typeof sforce != 'undefined') && (sforce != null) && (sforce.one) ) {
    // Salesforce1 navigation
}
To make sure there is a sforce.one instance?

Thanks
 
Hi All,

I'm new to the Apex side of things and creating Triggers so hoping someone can help.. Here's the scenario; I'd like to automatically update a custom field on a Contact when a custom field relating to Task (ActivityHistory) has a value assigned (1-5). The custom field on the Task is populated based on the Subject content of the completed Task. For example, an email comes in with the Subject of "1 star", the custom field for the Task updates with the value 1, I'd like the custom field on the Contact to also update to read the value 1.

I saw on another post this code but I'm wondering how I need to manipulate it for the above.

Many thanks in advance.


trigger UpdateOpptyIndicator on Opportunity (after insert,after update) {
    System.Debug('ENTERED INTO TRIGGER');
   Contact con,oldCon;
    if (trigger.isInsert) {
    System.Debug('INSIDE ISINSERT');
        if(trigger.isUpdate)
        {
           
        }
        else
        {
            for(Opportunity opp : trigger.new) {
                con=[Select id,Opportunity_Indicator__c from Contact where id=:opp.Contact__c];
                if(con.Opportunity_Indicator__c != null)
                    con.Opportunity_Indicator__c = con.Opportunity_Indicator__c + 1;
                else
                    con.Opportunity_Indicator__c = 1;
                    System.Debug('First Place');
                    update con;
            }
        }
  }
  else {
      System.Debug('INSIDE ISUPDATE');
      if(trigger.isUpdate)
      {               
                for(Opportunity opp : trigger.new) {
                    Opportunity oldOpp = Trigger.oldMap.get(opp.id);
                    System.Debug('OLD OPPORTUNITY :' + oldOpp.Contact__c);
                    System.Debug('NEW OPPORTUNITY :' + opp.Contact__c);
                    if(opp.Contact__c != oldOpp.Contact__c) {
                        con=[Select id,Opportunity_Indicator__c from Contact where id=:opp.Contact__c];
                        System.Debug('PREVIOUS VALUE :'+ con.Opportunity_Indicator__c);
                        if(con.Opportunity_Indicator__c != null)
                            con.Opportunity_Indicator__c = con.Opportunity_Indicator__c + 1;
                        else
                            con.Opportunity_Indicator__c = 1;
                           
                        System.Debug('NEW VALUE :'+ con.Opportunity_Indicator__c);
                        update con;
                        Contact con1 = [Select id,Opportunity_Indicator__c from Contact where id=:opp.Contact__c ];
                        System.Debug('AFTER DATABASE UPDATE :'+ con1.Opportunity_Indicator__c);
                        break;

                    }
                   
                      //System.Debug('Second Place');
                 }
      }
  }
/* try{
        update con;
     }catch(Exception e){
        System.debug('Exception Ocurred'+e.getMessage());       
    }*/

}
Hello All,

I have this following requirement


a) A custom button to be exposed

b) Upon clicking the button, I need to verify whether the current record is already present in a custom object

c) If the match is found I need to call TIBCO

d) If the match is not found, then I need to popup a message

Can someone point me in a direction as to how to proceed ?.

Thanks for your time !!!

Hi All,

I am trying to run a report from apex and get the JSON response I've looked the the documentation but I can see how to get the data from out-side the system but I can't find how to run the report from within Salesforce,

 

Please help,

Thank you,

Roy

 

Link to the documentation:

http://www.salesforce.com/us/developer/docs/api_analytics/index.htm

 

 

Hi There,

 

I am having a URL which should auto populate the Account, Opportunity  and other object value called xxxxObject name on Case object.

 

below is the url 

 

/setup/ui/recordtypeselect.jsp?ent=Case&retURL=%2F{!Opportunity.AccountId}&save_new_url=%2F500%2Fe%3FretURL%3D%252F{!Opportunity.AccountId}%26def_account_id%3D{!Opportunity.AccountId}&CF00N30000009pICP={!Opportunity.Name}&CF00N30000009pICP_lkid={!Opportunity.Id}&CF00Ne0000000Wuu9={!Enrol_Event__c.Name}&CF00Ne0000000Wuu9_lkid={!Enrol_Event__c.Id}

 

It is populating Account,Opportunity but not EnrollmentEvent.

 

it works in dev box , but it is not working in Test environment , i am not understanding what's wrong with above url.

Please suggest me why I am unable to populate the enrollmenteventname.

Hi,

I am force.com developer and new to Integration. Currently we have standard alone java application which is used to connect Oracle database to update salesforce data. Currently we have hard coded the credentials in java program.

 

 - What is best approach for programmatic (Java) Integration? SOAP or REST? (The volume of data is huge.) 

 - What is best authentication approach to avoid hard coding the credentials in the application?

 

As per my knowledge Oauth will work only for web applications.

 

Kindly clarify the above questions and also suggest the resources that gives good understanding in SOAP, Rest ,Oauth....

 

Thanks in advance.

 

- Indy.

  • August 23, 2013
  • Like
  • 0

Hi Everyone,

 

I am loading data from the external System.

I have created a field called EUID --the unique Id for the external system.

and at  field level i am not allowing the duplicates.

and at the second scenario .

I will be not getting the EUID values i.e it will be blank.

That record should not be inserted.Suppose if i give the field Required ,even at the page layout the the field will be required.

 

Can i make the field required at API level

 

How to achevie this .Can any one Help .

 

Regards,

Sailed

As I am new to Apex and salesforce, someone told me that I need to write test class for each class that I have written and test them.

 

If I don't have test class, I can't move to production.

 

Is that correct?

 

Why do I need to write test class for each class I have written? Actually, sometimes it is so troublesome as I need to write even a new class to call to external end point. Even though my actual method has been working and already tested to call to end point, when I wirte test calss, it won't allow me to call http method directly and need to even create new class as Mock.

 

As someone scaring me , if I don't finish test class, I can't move my code to production.

 

Any helpful link or useful explanation will be so much appreaciated.

Hi all,

Can anyone let me know whether we can auto populate a field value based on another  lookup field value??

 

Eg : 

 

We have  STUDENT and COURSE objects. In STUDENT we had two fields like 'Course Interested (Lookup)' and 'Total Fee(currency)' and in COURSE object we had fields like 'course name' and 'fee'. If we select the Course Interested through lookup, the respective fee of that course should be auto populated in the 'Total Fee' field.

  • July 15, 2013
  • Like
  • 0

Hi,

 

I think this is easy, but it will need Apex...

 

Short version,

Need help crafting Apex code and tips to implement to send out out an email when a Lead is assigned to a Rep. Have a template that would like to use and we have Round Robining on Leads in place.

 

Is there some relatively short code to use!? Appreciate any guidance :)

 

Long version

Collecting around 400 leads a month. It was a requirement of our deployment that Leads Round Robin instead of the default queue behaviour. This was accomplished using an Assignment Group Package

 

That's working fine, but it seems to stop the immediate automated notifications from working.

I believe this is because this system has Leads "owned" briefly by the queue before changing the owner to a relevant individual.

 

So a Lead is created, the queue notifications are run (as well as any out of workflows) before owner is changed to a Sales Rep, then the assignment is changed and notifications aren't triggered again.

 

To confirm, an immediate notification DOES work if leads are "Assigned to Group" by a user, but when they are first Created the immediate notifications don't cooperate.

 

The only way I could get this to work at all was to have the notification on a Time Delayed workflow - the smallest increment is one hour and really this is too slow on a New Lead notification.

 

If there's an alternative fix happy to try, but otherwise would appreciate some help with the code...

Have found some code

tested in Sandbox

I believe I should also make sure to use "TargetObjectId" to avoid limits?

 

THANKS!!!

 

Hi,
I have an Account1 record under that i have 10 Contacts.
I want tow display contacts in flow charts like in attched document.
i m getting contacts records List<Contact> con{get;set;} like

public List<Contact> getAllContacts(){
try{
con=[SELECT Name FROM Contact where Account1_C='AccID']; 
return con;
}catch(Exception e){
return null;
}
}
In Page i m using <apex:repeat> i m displaying in all values.

But it need in 1st row only 7 contacts after reverse order in need display contacts,for last record i don't want arrow image.

How to do in salesforce,I know in JSP how to do using loop


Hi,

 

i am trying to design the formula, If Quantity is 500 or 400 then pick "true value1" and if Quantity is 300 and Total>0 then pick "true Value1" but if Quantity is "300" and if total=0 then pick "true value 3"  otherwise pick "else value"

 

How/where can i write the statement "if Quantity is "300" and if total=0 then pick "true value 3"?

 

How can i handle this?  is there any  way available in salseforce?

 

 

IF(ISPICKVAL(Quantity , "500") || ISPICKVAL(Quantity, "400")   || AND(Total__c>0,ISPICKVAL(Quantity  , "300")) , “true value1”, “else value”)

 

also i am getting the below error for above formula

 

Formula(s) that reference this field are no longer valid: Compiled formula is too big to execute (5,017 characters). Maximum size is 5,000 characters

 

Why so?Can anyone please help?

 

 

I am trying to use Test.loadData to load parent and child records linked by the Master Detail relationship.

 

I have been referencing the follwoing:

 

SF DOC:

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_test.htm

 

SF KNOWLEDGE ARTICLE

http://help.salesforce.com/apex/HTViewSolution?id=000167032&language=en_US

 

DISCUSSION BOARD

http://boards.developerforce.com/t5/Apex-Code-Development/Test-loadData-how-to-relationships/td-p/557477

 

However, none of these solve the problem.   Here is what I have done:

 

1)  Added an External ID field on both Parent and Child  "Load_Key__c"

2)  Created an Extra field on the Child, which holds the value of the External Id on the Parent. "PG_Load_Key__c"

 

Here is where things are not working.  

 

#1  

If I follow the examples, they instruct to do the Test.loadData with both Parent and Child.  Then, create a Map from the parent, setting the respective refernce.   This is where things fall down.  If I try the lodData on the child, with the Parent Reference empty, I get the error "Required fields are missing"

 

Therefore, I cannot get past the loadData on the child to add the references to the Parent.

 

#2

I tried just putting the Parent's External ID value into the Mater Detail field of the child and I get the error:  "Invalid ID value"

 

#3

I can load this data in the Data Loader using the External ID, (that does not help me with my test scripts).  I use a modified map file with the syntax: PG_Load_Key__c=Product_Group__r\:Load_Key__c

 

I have tried naming the field to see if it can leverage the same syntax, but it fails for these optons:

Product_Group__r\:Load_Key__c

Product_Group__r:Load_Key__c

Product_Group__r.Load_Key__c

PG_Load_key__c=Product_Group__r\:Load_Key__c

 

 

So, I am stuck.  I cannot load the child without the Parent Key.  I cannot modify the static resource file to put the key in at runtime.  I cannot find a way to have SF do the lookup on the External ID of the Parent.

 

How can anyone load Child (Master Detail) record with the Test.loadData()?

 

I have a complex object graph with about 8-10 objects with mutiple layered lookups and Master Details.

 

Has anyone accomplished this?

Steve

 

 

Hi,

 

I  want to create the custom button for updating the field value by means of some condition. 

 

For an example, If the field name is 'Test', After clicking the custom button, field name should be changed to "Test Updated'

 

Please guide me for doing this..

 

Any help is appreciated .

 

 

Thanks,

Ambiga

Hi all,

 

Recently I finished learning about standard things in Salesforce and now I am trying to learn Apex.

 

I have very limited knowledge in HTML, CSS, JavaScript and Java. So I feel very difficult in understanding the 'Controller' code in Apex. I am trying to understand the code in Apex guide & Visualforce guide, but not able to understand.

 

Can someone guide the easy way to start wring Apex controller.

 

R - Manu

Hi,

 

I have a custom link titled Download on my Contacts page layout. Clicking this link directly downloads a custom report. I used URL content source to achieve this.

 

The download/export function works fine; however, on clicking download, I auto navigate to a blank page having the following URL in the browser URL bar: ...force.com/servlet/servlet.Integration?lid=00bi00000016M8D&eid=003i000000Bswj8&ic=1

 

I used the following URL in the content source for the Download link and the return functionality doesn't work: /00Oi0000002vZ5W?export=1&enc=ISO-8859-1&xf=xls&retURL=%2F003i000000Bswj8

 

where 003i000000Bswj8 is the Contact record ID that has the custom Download link and is the page to which I would like to redirect (or remain on) after the Download link is clicked. With how the URL works currently, the user has to manually click back on the browser to return to the Contact record.

 

How can I modify the URL so that I remain on the same Contact record instead of staring at the ensuing blank page? If JavaScript is the only solution, I would really appreciate the code pasted here.

 

I am a programming-illiterate admin who recently hired a free-lance programmer to write a simple trigger for our org and provide directions for deployment. He finished the job, and now directed me to write the test class prior to deployment. I had a look at the instructions and its Greek to me. He now offered to do it for me, at an extra cost. Does it make sense that this would not be considered a natural part of the trigger development and would require an extra cost?

Today we’re excited to announce the new Salesforce Developers Discussion Forums. We’ve listened to your feedback on how we can improve the forums.  With Chatter Answers, built on the Salesforce1 Platform, we were able to implement an entirely new experience, integrated with the rest of the Salesforce Developers site.  By the way, it’s also mobile-friendly.

We’ve migrated all the existing data, including user accounts. You can use the same Salesforce account you’ve always used to login right away.  You’ll also have a great new user profile page that will highlight your community activity.  Kudos have been replaced by “liking” a post instead and you’ll now be able to filter solved vs unsolved posts.

This is, of course, only the beginning  and because it’s built on the Salesforce1 Platform, we’re going to be able to bring you more features faster than ever before.  Be sure to share any feedback, ideas, or questions you have on this forum post.

Hats off to our development team who has been working tirelessly over the past few months to bring this new experience to our community. And thanks to each of you for helping to build one of the most vibrant and collaborative developer communities ever.