• praveenkumar
  • NEWBIE
  • 0 Points
  • Member since 2011

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

Hi All ,

 

Please look forward on to my requirement...

 

I need to assign the Case Owner ( Standard field ) value to a default value from the queue, for this i used workflow rule.

 

But with workflow rule field update action it is updating after the page is submitted, i need this case owner field sholud be defaulted before submitting that is when the page gets loaded.

 

Please share your ideas on this requirement.

 

Thanks,

Praveen K 

Hi All,

 

I am trying to set a field to a default value, if i take a text field and assign it to some default value but it can be editable, I want the field to set as default and it cant be editable...

 

Please give me some suggestions to do this...

 

Its urgent.....

 

Thanks in advance..

 

Praveen K.

Hi All,

 

The below is the code for Opportunity product line check trigger, when Save this code i am getting an error like 

 

 

ErrorError: Compile Error: Invalid field Product_Line__c for SObject Opportunity at line 26 column 30

 

 

This Product_Line__c field exists in OpportunityLineItem Object and Exclusion_Check__c exists in Opportunity object, How can i use the Product_Line__c field value, if write the trigger in OpportunityLineItem.... 

 

trigger OpportunityProductLineCheck on Opportunity (before update)

{

    String CN_var='';

    String OE_var='';

    String OB_var='';

    String OR_var='';

 

Set<id> OpptyIDs = new set<id>(); // Creating a set for storing Opportunity ids

 

for(opportunity o:trigger.new)

{

    OpptyIDs.add(o.id); // Adding ids into OpptyIDs

}

 

list<Opportunitylineitem> opp=[Select Id,Product_Line_F__c from OpportunityLineItem where OpportunityId in : OpptyIDs];

 //Getting id and Product_Line__c field values in to opp list

 

list<Opportunitylineitem> proline= [select Product_Line_F__c from OpportunityLineItem where OpportunityId in : OpptyIDs];

//Creating a list and adding the Product_Line__c field values into proline list

 

map<id,id> id_pro=new map<id,id>();

//Creating a list for putting the ids and Product_Line__c in to id_pro Map 

 

for(Opportunity op:trigger.new)

{

     mymap.put(op.id, op.Product_Line__c  );

}

list<Opportunitylineitem> opppro=new  list<Opportunitylineitem>();

for(Opportunitylineitem o : opp )

 {

     opppro=[select Id,Product_Line_F__c from OpportunityLineItem where OpportunityId = : o.ID];

      for(OpportunityLineItem oli : opppro)

      {

         if(oli.Product_Line_F__c=='Connect')

         {

              CN_var = '[CN]';

         }

         if(oli.Product_Line_F__c=='OpenEdge')

         {

              OE_var = '[OE]';

         }

         if(oli.Product_Line_F__c=='ObjectStore')

         {

              OB_var = '[OB]';

         }

         if(oli.Product_Line_F__c=='Orbix')

         {

              OR_var = '[OR]';

         }

     }

     for(opportunity op: opp)

     {

              op.Exclusion_Check__c = CN_var + OE_var + OB_var + OR_var;

              system.debug('*** Filter products checked; applicable code added to filter field ****');

     }

}

 

 

Writing the trigger on one object, i need to use the field value of another object....

 

Please help me in writing this trigger...

 

 

Thanks in Advance...

 

Regards,

Praveen K

Hi All,

 

This is praveen, I am a salesforce user, i have written some part of visualforce code shown below,

 

 

 

<apex:page standardController="Account">
<apex:form >
<script>    
if("{!$Profile.Name}".substr(0,3)=="GFO")
 {      
     alert("New GFO accounts can only be created through lead conversion.  If you need assistance creating a new account, please contact SFDCacctrequests@progress.com");   
     window.location="https://tapp0.salesforce.com/001/o";
 }
 else
 {
     window.location="https://tapp0.salesforce.com/setup/ui/recordtypeselect.jsp?ent=Account&retURL=%2F001%2Fo&save_new_url=%2F001%2Fe%3FretURL%3D%252F001%252Fo";
 }
</script>
</apex:form>
</apex:page>

 

 

 

Now the issue what i am getting is ,this visualforce page is refreshing everytime when some users runs it other than GFO. If GFO users runs this it needs to show an alert with the above mentioned message...

 

I need an urgent solution for this issue...

if any one knows please send reply...

Hi All ,

 

Please look forward on to my requirement...

 

I need to assign the Case Owner ( Standard field ) value to a default value from the queue, for this i used workflow rule.

 

But with workflow rule field update action it is updating after the page is submitted, i need this case owner field sholud be defaulted before submitting that is when the page gets loaded.

 

Please share your ideas on this requirement.

 

Thanks,

Praveen K 

Hi All,

 

I am trying to set a field to a default value, if i take a text field and assign it to some default value but it can be editable, I want the field to set as default and it cant be editable...

 

Please give me some suggestions to do this...

 

Its urgent.....

 

Thanks in advance..

 

Praveen K.

Hi All,

 

The below is the code for Opportunity product line check trigger, when Save this code i am getting an error like 

 

 

ErrorError: Compile Error: Invalid field Product_Line__c for SObject Opportunity at line 26 column 30

 

 

This Product_Line__c field exists in OpportunityLineItem Object and Exclusion_Check__c exists in Opportunity object, How can i use the Product_Line__c field value, if write the trigger in OpportunityLineItem.... 

 

trigger OpportunityProductLineCheck on Opportunity (before update)

{

    String CN_var='';

    String OE_var='';

    String OB_var='';

    String OR_var='';

 

Set<id> OpptyIDs = new set<id>(); // Creating a set for storing Opportunity ids

 

for(opportunity o:trigger.new)

{

    OpptyIDs.add(o.id); // Adding ids into OpptyIDs

}

 

list<Opportunitylineitem> opp=[Select Id,Product_Line_F__c from OpportunityLineItem where OpportunityId in : OpptyIDs];

 //Getting id and Product_Line__c field values in to opp list

 

list<Opportunitylineitem> proline= [select Product_Line_F__c from OpportunityLineItem where OpportunityId in : OpptyIDs];

//Creating a list and adding the Product_Line__c field values into proline list

 

map<id,id> id_pro=new map<id,id>();

//Creating a list for putting the ids and Product_Line__c in to id_pro Map 

 

for(Opportunity op:trigger.new)

{

     mymap.put(op.id, op.Product_Line__c  );

}

list<Opportunitylineitem> opppro=new  list<Opportunitylineitem>();

for(Opportunitylineitem o : opp )

 {

     opppro=[select Id,Product_Line_F__c from OpportunityLineItem where OpportunityId = : o.ID];

      for(OpportunityLineItem oli : opppro)

      {

         if(oli.Product_Line_F__c=='Connect')

         {

              CN_var = '[CN]';

         }

         if(oli.Product_Line_F__c=='OpenEdge')

         {

              OE_var = '[OE]';

         }

         if(oli.Product_Line_F__c=='ObjectStore')

         {

              OB_var = '[OB]';

         }

         if(oli.Product_Line_F__c=='Orbix')

         {

              OR_var = '[OR]';

         }

     }

     for(opportunity op: opp)

     {

              op.Exclusion_Check__c = CN_var + OE_var + OB_var + OR_var;

              system.debug('*** Filter products checked; applicable code added to filter field ****');

     }

}

 

 

Writing the trigger on one object, i need to use the field value of another object....

 

Please help me in writing this trigger...

 

 

Thanks in Advance...

 

Regards,

Praveen K

Hi All,

 

This is praveen, I am a salesforce user, i have written some part of visualforce code shown below,

 

 

 

<apex:page standardController="Account">
<apex:form >
<script>    
if("{!$Profile.Name}".substr(0,3)=="GFO")
 {      
     alert("New GFO accounts can only be created through lead conversion.  If you need assistance creating a new account, please contact SFDCacctrequests@progress.com");   
     window.location="https://tapp0.salesforce.com/001/o";
 }
 else
 {
     window.location="https://tapp0.salesforce.com/setup/ui/recordtypeselect.jsp?ent=Account&retURL=%2F001%2Fo&save_new_url=%2F001%2Fe%3FretURL%3D%252F001%252Fo";
 }
</script>
</apex:form>
</apex:page>

 

 

 

Now the issue what i am getting is ,this visualforce page is refreshing everytime when some users runs it other than GFO. If GFO users runs this it needs to show an alert with the above mentioned message...

 

I need an urgent solution for this issue...

if any one knows please send reply...

Hi

 

I have successfully imported the Entreprise WSDL into a new SOAP Project. I can LOGIN with success, use the GETSERVERTIMESTAMP successfully but I am unable to use the UPSERT call.

 

I have copy-pasted part of the sample available here : SOAP Sample Message

 

 

<urn:externalIDFieldName>CIEID__C</urn:externalIDFieldName>
   <urn:sObjects xsi:type="Account">
      <CIEID__C>1330</CIEID__Cc>
      <Name>Acme Rocket Superstore</Name
      <NumberOfEmployees>340</NumberOfEmployees>
   </urn:sObjects>

 Error msg : The prefix "xsi" for attribute "xsi:type" associated with an element type "urn:sObjects" is not bound.

 

 

So, code was adapted :(xsi:type was removed) :

 

   <urn:sObjects ="Account">
      <CIEID__C>1330</CIEID__Cc>
      <Name>Acme Rocket Superstore</Name>
      <NumberOfEmployees>340</NumberOfEmployees>
   </urn:sObjects>

 

Error msg : Element type "urn:sObjects" must be followed by either attribute specifications, ">" or "/>". (I also tried with <urn:sObjects =Account> with the same error msg).

 

Finally, code was adapted to :

 

 

   <urn:sObjects>Account</urn:sObjects>
      <CIEID__C>1330</CIEID__Cc>
      <Name>Acme Rocket Superstore</Name>
      <NumberOfEmployees>340</NumberOfEmployees>
   <!--/urn:sObjects-->

 And error msg was : INVALID_TYPE: Must send a concrete entity type

 

Do someone have any idea how to successfully make such a call ??

 

Thank you in advance

 

Dimitri