• kbromer
  • NEWBIE
  • 100 Points
  • Member since 2010

  • Chatter
    Feed
  • 4
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 25
    Replies

I have an outbound message set up to send a SOAP request to a web service that I have created.  In viewing the actual request there is an organization id that is sent:

 

<notifications xmlns="http://soap.sforce.com/2005/09/outbound">
   <OrganizationId>00DS00000007WwpMAE</OrganizationId>

 

I was hoping to use this id for identification purposes because I'll end up having multiple SFDC customers using this web service.  The problem, though, is that the id has "MAE" tacked onto the end.  Does anyone know whether this is a standard practice?  Is this possibly happening because I'm generating the request out of my sandbox?  I don't want to just remove the last 3 characters because I'm not certain what SFDC is going to do in either a live environment or with  different customers.

 

Thanks

  • September 17, 2010
  • Like
  • 0

 

here is what my problem is and maybe you can set me straight on what i should be writting instead of what i am trying to write. i ran into the "script too large" error. so i am trying to figure out how to break apart the script into different classes.

 

one script has some logic to run a update / insert command. what i am trying to do is run that same logic but before commiting to the database just present a type of "Are you sure?" option with a "yes", and only when they click "yes" will it actually commit to the database.

 

i know you can probably get this all in one script but please help me understand my choices for getting different scripts to work with the same variables.... because the script really has a lot going on and even if i re-write the whole thing to be more efficient. i am still going to run into "script too large" error eventually until i know how to get more than one class to talk to each other. im sure there is a better what to go about this.

 

 

here is an example:

 

in one script different variables are created. for example a task.

 

	public Task task;
	public Task getTask(){
		if(task==null) task = new Task();
		return task;
	}

 

so the user would fill out the subject line of that task .

 

in another script id like it to be able to see the same variable and subject value from the first script. so another script could do something like this.

 

 

if(task!=null && task.subject!=null && task.subject.length()>0){
     // some stuff
}

 

 

 

 

I have a Case Object and there are two child objects.

First child object is  Provider

Second child object is Finished goods

and there is no relation between provider and finished goods.

can i write a trigger to update a field in Provider when there is change of field in finished goods.?

Is this achievable if so how?

Good day. I am not sure if this question should be here on on the Formulas and Validation Rules board, so I am posting it in both places.

 

We have a need to take Lead information (phone number, State, etc.) and have that info appear on the Task when a Task is created for that Lead. I have been struggling with this for a while and it's driving me crazy. I would seriously give someone some $ if they could give me a way to do it.

 

Thank you!

 

R

 

Hello everyone,

 

I attemped to start a new thread in the Non Profits message board - but for whatever reason it did not allow me the ability to create new topics - so please forgive me if this is not the board to ask about nonprofits -

 

I am configuring an org with the Nonprofit Starter Pack and am attempting to set up processes dealing with Individuals and Non Individuals. Individuals will utilize the person account like feature and Non Individuals will be normal Account/Contact records.

 

Currently I have two processes for creating Individuals (person accounts). I have created an "Individual" Lead record type which I select, input desired information on lead record and then I convert them from a Lead by maintaining that the value, "Self", resides in organization name so that the code knows to create a person account for that Individual. My second process is that if I would like to create an Individual without converting them from a lead - I simply go to the contact tab, create a new record, and leave the organization name blank so that when created, the resulting record is a person account.

 

My processes for creating Non Individual records are as follows -

First, if converting from a lead - I have created my "Non Individual" Lead record types (more than one), for which I select, then proceed to fill out the lead record type information and inputting the company's name in the organization name field. When I convert the lead this creates a regular account and contact associated with it. Second, if just creating an account/contact without converting from a lead, I just go straight to the account tab and create the account as normal based off of Account record types for Non Individuals that I have created.

 

But I run into my problem here - I need to have a mutlipicklist "subtype" field on the lead and account. Once I create a lead record based on whatever record type I've chosen (either Individual, or a Non Individual record type), I then need to select values from this multiselect picklist which values are dependent on the record type. I need to be able to create an Individual using both processes (either by converting from a lead first, or by going straight to the contact tab) and then when on the person account record, select values from a multiselect picklist which values which is dependent on the "Individual record type". The problem occurs when I want to create a Non Individual contact off of a Non Individual Account and the multiselect picklist and values for the Individual process is the same because they are both using the same contact record type/page layout. I need to know how to effieciently separate these processes without creating multiple contact record types - is this possible? I know this is a lot to weed through, but thank you so much for any help.

  • January 15, 2011
  • Like
  • 0

Hi,

 

Anyone can help , this for loop not working in class but working on System Log.

 

Error:

ErrorError: Compile Error: expecting right curly bracket, found 'for' at line 5 column 0 

 

 

List <optedOutList> = new List<contact>();

List <activeContactList> = new List<contact>();

List networkList = [SELECT id,name,Account_Name__r.Name, Title__c,Industry__c FROM Contact WHERE Industry__c like :IndustryName AND OptOut__c = false ORDER BY Name ASC LIMIT 100];

 

for(Contact contactObject: networkList)

{

 if(contactObject.OptOut__c==true)

{

 optedOutList.add(contactObject);

 }

 else if(contactObject.active==true)

{

 activeContactList.add(contactObject);

}

}

  • September 21, 2010
  • Like
  • 0

I have an outbound message set up to send a SOAP request to a web service that I have created.  In viewing the actual request there is an organization id that is sent:

 

<notifications xmlns="http://soap.sforce.com/2005/09/outbound">
   <OrganizationId>00DS00000007WwpMAE</OrganizationId>

 

I was hoping to use this id for identification purposes because I'll end up having multiple SFDC customers using this web service.  The problem, though, is that the id has "MAE" tacked onto the end.  Does anyone know whether this is a standard practice?  Is this possibly happening because I'm generating the request out of my sandbox?  I don't want to just remove the last 3 characters because I'm not certain what SFDC is going to do in either a live environment or with  different customers.

 

Thanks

  • September 17, 2010
  • Like
  • 0

I'm pretty new to the SF API, but I do have most of the development tools installed, API access via PHP on my server, the force.com eclipse thing, apex expolorer, workbench, excel data connector, etc...

 

I need to run this query (in SQL) once now to update current records, and then I can put a little more effort into having it run  nightly:

 

 

Update Lead set matchfield = concat(Email, Affiliate_Of__c)  where matchfield is null        

 

Ideas?  Will that SQL run or do I need to change it?

 

 

I've done a few things with the API, and DO know the long way would be to pull every record and then update them (individually or batch)  But I can't help but to believe there must be a simpler way to run that update.

 

Thanks

 

 

 

Hello,

As a non-profit, I am trying to enable visitors on our website to Donate Online. Currently, we have this option through eTapestry. Since I have switched to Salesforce.com, however, I want the donation to be processed through salesforce.com instead of eTapestry.

 

I do not know if this is possible or if so how to go about setting it up.

 

Thank You!

Hi all,

 

We have written a batch apex class to process a large no of accounts, say 200k+ accounts.

The batch job runs fine upto 30K-35K accounts, but when the accounts records are more than 40K, it throws Apex heap size too large exception.

 

Have anyone faced this issue before ? please help us with any work around to avoid hitting this limit ...thanks..

  • September 13, 2010
  • Like
  • 0

Hello.  I am trying to update a custom object "Inventory_Name_c" to reflect the number of work orders associated to that inventory name that have a specific status.

 

I typically would do this via some sort of workflow field update.  Unfortunately, I have to make this update via Apex due to a follow-on action that requires Apex.

 

I modeled the below code after a solution mentioned on this discussion board...but I am still having issues.  Specifically, I am getting an error "Error: Compile Error: Invalid bind expression type of SOBJECT:WorkOrders_c for column of type String at line 10 column 34" when I do a quick save.

 

Any thoughts on how to resolve this would be greatly appreciated.  Below is the code.

 

*******

  

trigger CountWOStatus on WorkOrders_c (before insert) {

       
    Map <String, Integer> WOCount = new Map <String, Integer> ();
   
    String WOid = null;
    Integer nbr = null;
   
    for (AggregateResult agr: [SELECT  Inv_Name_ID_c, count(Id) numOfWorkOrd FROM WorkOrders_c
        WHERE Inv_Name_ID_c in :Trigger.new
         AND (WOStatus_c = 'Initial Stage')
           GROUP BY Inv_Name_ID_c]){
           
        WOid = string.valueOf(agr.get('Inv_Name_ID_c'));
        nbr = integer.valueOf(agr.get('numOfWorkOrd'));
        WOCount.put (WOid, nbr);   
        }  
   
    try {
       
        for (Inventory_Name_c IndivWOUpdate : Trigger.new){
           
            if (Integer.valueOf(WOCount.get(IndivWOUpdate.Id)) != null){
               
                IndivWOUpdate.Count_of_Work_Ord_c = IndivWOUpdate.Count_of_Work_Ord_c + Integer.valueOf(WOCount.get(IndivWOUpdate.Id));
            }
           
            else IndivWOUpdate.Count_of_Work_Ord_c = IndivWOUpdate.Count_of_Work_Ord_c;
           
        } // end for IndivWOUpdate
       
    }// end try
   
    catch (System.Queryexception e){
       
        System.debug('WO Item Count ERROR:' + e);
       
    } // end catch
   
}

 

Can any one help me out of this problem?

this is the requiremnt: 

During contact creation process we need to enforce users to accept Legal  Disclaimer. Once users accepts the legal disclaimer we need to allow them to create Contact and then system is going to predefault and lock "Opt in" flag to 'N' and   "DO Not Email", "Do Not Mail" , "Do Not FAX" flags to "Y" . We need to enable users to use Contact opt In process. This contact Opt in process will allow users to send opt In email to customer, this email will have opt in and opt out link for the customer. If the user choose to opt in, this will be an inbound email to SFDC which drives the update to 'Opt In" flag to "Y" and in  turn update ""DO Not Email", "Do Not Mail" and "Do Not FAX" flags to "N". Else "Opt In","DO Not Email", "Do Not Mail" and "Do Not FAX" flags remains 'N".

 

 

For this what is the solution?

 

 

Regards&Thanks,

REKHA.N

  • August 17, 2010
  • Like
  • 0

 

here is what my problem is and maybe you can set me straight on what i should be writting instead of what i am trying to write. i ran into the "script too large" error. so i am trying to figure out how to break apart the script into different classes.

 

one script has some logic to run a update / insert command. what i am trying to do is run that same logic but before commiting to the database just present a type of "Are you sure?" option with a "yes", and only when they click "yes" will it actually commit to the database.

 

i know you can probably get this all in one script but please help me understand my choices for getting different scripts to work with the same variables.... because the script really has a lot going on and even if i re-write the whole thing to be more efficient. i am still going to run into "script too large" error eventually until i know how to get more than one class to talk to each other. im sure there is a better what to go about this.

 

 

here is an example:

 

in one script different variables are created. for example a task.

 

	public Task task;
	public Task getTask(){
		if(task==null) task = new Task();
		return task;
	}

 

so the user would fill out the subject line of that task .

 

in another script id like it to be able to see the same variable and subject value from the first script. so another script could do something like this.

 

 

if(task!=null && task.subject!=null && task.subject.length()>0){
     // some stuff
}

 

 

 

 

I have a Case Object and there are two child objects.

First child object is  Provider

Second child object is Finished goods

and there is no relation between provider and finished goods.

can i write a trigger to update a field in Provider when there is change of field in finished goods.?

Is this achievable if so how?

hi ,

I want to create a random password and send to the users for their login in to my site.I have their salesforce email Ids.So i need to generate a random password.Can anybody share code if you can.

hi all,

 

I have developed a before update trigger which has to fire when the lead status changes to reject then it should change the user to the manager of that user it is working perfectly in UI testing but getting errors when  testing with data loader.the error i am getting is "data changed by trigger for field Owner ID: owner cannot be blank". can any one help me to fix this error.

 

 

  • August 12, 2010
  • Like
  • 0