• Eyal_Wiz
  • NEWBIE
  • 5 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 27
    Questions
  • 34
    Replies
Hi all,

i'm trying to create a workflow or formula field for implementing the following logic:
in my org we define the role in the following way - "Role Description - Location", i.e. "Education Counselor- Boston"

i've created a custom text field inside the lead object which called "location__c"
i'm trying to cut only the location part from the owner role and paste it into this location field. i want to do it every time a lead is created or edited.

for example: for a lead with an owner role of "Education Counselor- Boston" the location field should be "Boston".

Any help with that will be greatly appreciated.

Thanks
Eyal
Hello Everyone
 
I'm trying to create a list button that will apply manual sharing on multiple records  (kind of like what the "Change owner" button is doing).
I've tried to directly create records in the "Object__Share" table. Here is the code:
 
Code:
<html>
<head>
<script src="/soap/ajax/11.1/connection.js"></script>
<script src="/desktop/desktopApi.js"></script>
<script>

// Create an instance of a custom_object
var new_Custom_Object = new sforce.SObject("Class_Registraion__Share");

new_Custom_Object.ParentId = {!$User.Id};
new_Custom_Object.AccessLevel = 'Read';
new_Custom_Object.RowCause = 'Rule';// change value of object
new_Custom_Object.UserOrGroupId = '00G30000000hMJkEAM'; 

// Create the Object
 try
 {
  var saveResult = sforce.connection.create( new_Custom_Object );
  // Check to see that the object was created successfully
  if ( saveResult[0].getBoolean("success") )
  {
     alert( "Success  " );
  }
  else
  {
    alert( "Error occurred: " + saveResult[0] );
  }
//}
</script>
</head>
<body onload="init()">
<p>&nbsp;
</p>
</body>
</html>

when i run this nothing happens - it just giving me blank screen...
 
I've also tried using {Action.Object__c.Sharing} inside an s-control or directly on the button with "Execute Javascript" but i cannot seem to get it work.
 
does anyone have any expirience with it or did something similar?
 
Any answer will be much appriciated
Eyal
Hello everyone,
 
Is anyone knows if it's possible to make the "Campaign History" section inside the contact screen read only?
 
I'm looking for a way to only let my users to insert data but not to update it or delete it.
 
Any leads on this one will be much appriciated.
 
Thanks
Eyal
hi everyone,
 
i've deleloped and deployed a salesforce applocation with triggers in it before the test method requirment (i did it with unmanaged package).
now i want to update/de-activate/delete the trigger in the production account and can't.
 
i've tried doing this using the eclipse for doing this but i keep getting the following error:
 "Severity and Description Path Resource Location Creation Time Id Test coverage of selected Apex Class and Trigger is 0%, at least 75% test coverage is required  Salesforce OTA line 1 1205682890046 75"
 
i also tried to create an apex class with test method for this one, but when i try to save the class to the server i'm getting the same error.
 
any ideas of what am i doint wrong here?
 
Thanks alot
Eyal
 

 
Hi everyone,
 
Does anyone knows if it possible to control the sort insdie the a lookup field list.
the problem my customers have is that they really got alot of results inside that list and a sorting by date could really help them.
 
so if anyone can help me with that one i will really appricate it.
 
Thanks
Eyal
hey guys,
I was suppose to upload an application that i've wrote today and i have a really big problem with code coverage and testing.
i've wrote this trigger that does something with my custom objects.
trigger Check_Sold_Out on Class_Registration__c (after delete) { Class_Registration__c[] Current = Trigger.old; Class__c current_class = [select Id,Sold_Out__c from Class__c where Id=:Current[0].Class__c for update]; Class__C[] Classes= [select Name,Seat_Capacity__c, Location__c,Class_Date__c from Class__c where Id=:Current[0].Class__c ]; User[] Users= [select Email from User where Id=:Current[0].OwnerId ]; Integer Reg_Num = [select Count() from Class_Registration__c where Class__c=:Current[0].Class__c and Registration_Status__c <> 'Cancelled' and Registration_Status__c <> 'Waiting List' ]; if (Reg_Num < Classes[0].Seat_Capacity__c){ current_class.sold_out__c = false; update current_class;} }

i wrote this apex class for testing:
public class Check_Sold_Out {

 static testMethod void myTest()
 {
  Class_Registration__c Current = [select Id from class_registration__c where Registration_Notes__c='1'];
  delete Current;
  }

}
 
 
now the thing is that i'm not sure what i should do with it. i run it and it said that i've got 100% code coverage,
but when i'm trying to upload the package it says that i've got no test method defined for this trigger.
i must be missing something here. i am really deseprate for any kind of help as i'm late on the rollout schedule.
 
any kind of help would be really appricated!!! 
 
I also be glad to pay someone for helping me with this -i need help ASAP.
 
Thanks
Eyal
 
Hi Everyone,
 
When converting a lead in the "convert lead" screen there is a checkbox called "Do not create a new opportunity upon conversion".
I've defined my users a certain process of working with salesforce in which it very important that they'll not create an opportunity when converting a lead.
 
Is there a way to make this checkbox checked as default or even checked and read only?
 
Thanks
Eyal
Hi All
 
I've created a new custom field inside the opportunity object, this custom field is a picklist.
I'm trying to create the following workflow: when an opportunity is created or edited i want to update the opportunity name with the value that was choosen in this picklist.
 
I've created a workflow that runs after opportunity is created/changed and created a new workflow action in which i'm trying to update the opportunity name. the problem is that when i'm trying to select this picklist name i'm getting the following error:
 
Error: Field Generic_Class_Type__c is a picklist field. Use it with an ISPICKVAL() or CASE() function instead.
 
I don't understand why should i use ISPICKVAL, i only want the opportunity name to be updated with the value that was selected in this picklist (no matter what that value is).
 
Thanks Alot for your help
Eyal
Hi all,
 
Is there any way to redirect the user to another URL once a record is updated?
 
I've created a new custom object, i've a "after update" trigger for this custom object and in this trigger i'm trying to redirect the user to another location if a certain condition that i defined is happening.
 
I would really appriciate any lead or idea for solving this as i really need a solution for this real quick.
 
Thanks alot
Eyal
Hey all,
 
I'm looking for a way to re-direct the user to a certain URL using apex trigger.
 
in that certain trigger i'm checking some condition and if it's true then I want to redirect the user to this certain URL.
 
It's really really urgent for me to find a solution for that one.
If anyone has an idea for this or think there is another way to solve what i've just mentioned it'll help me alot!!
 
Thanks
Eyal
 
I recently finished developing an application for one of my customers.
 
I've uploaded it to the appexchange and installed it in his account.
Everything went fine beside the screens layouts that did not transferd from the developer account to my customers account.
 
Is there any way to transfer the layouts of the screens too??
 
I recently asked this question and no one answerd me, i'm asking again because I couldn't find any answer in the documentation and i'm about to install a new version of the application and i really need to find a solution for this.
 
Any help will be much appreciated,
Thanks


Message Edited by Eyal_Wiz on 01-09-2008 12:08 AM
Hey everyone,
 
I've just finished developing an application for one of my customers.
 
I've uploaded it to the appexchange and installed it in my customer's account.
everything worked perfectly fine beside the changes that I've made in some objects layout.
 
For example, I've added some custom fields to the opportunity object and added them to the opportunity layout (in my developer account). for some reason i'm not getting this layout in my customer's account (also the fields was transfered to his account)
 
What was i suppose to do for transfering the layout to my customer's account?
 
Any advice will be much appreciated,
Eyal
 
 
Hi everyone,
 
I'm looking for a way for creating a custom tab that will dislpay a certain URL, I remember that I bumped into a PDF that describes how to do that but I can't find it now.
 
Can someone explain me how to do that or direct me to the right PDF that describe how to do that?
 
Any help will be much appreciated,
Eyal
I'm trying to find a way to call to a URL. like window.location in javascript.
 
I tried finding the answer in the apex developer's guide but nothing camp up.
 
for example, I want to redirect the page to go to www.google.com
 
any suggetions?
 
 
Thanks
Eyal
Hi
 
I'm trying to create a special sharing for one of my custom objects.
In my application, each user is linked with a location. I created a public group for each location and when I add new user to salesforce I indicate to which location it belongs.
 
The thing is I want that every user will automatically see only the records that people from his loaction created.
 
In the campaign object for example, there is a button called "sharing", with it- I can determine which users/groups/roles will see my records. but I can't seem to find a way to put this button in other objects.
 
Is there any way to create sharing like I described?
 
Thanks Alot
Eyal
I'm trying to write a trigger for an oppurtunity. I want to create a new custom object record (that will include some information from that oppurtunity) every time a new oppurtunity is created.
 
The problem is that I don't know how to refer to the current oppertunity fields...
 
What I wrote till now is:
Code:
trigger try_trigger on Opportunity (after update) {
Class_Registration__c ClassReg = new Class_Registration__c (
 Registration_Notes__c=XXXXXXXXXXXXXX
);

insert ClassReg;
}

 where I wrote XXXXXXXX I want to put a field from the oppertunity that invoked the trigger. Is it possible?
 
Thanks for your help,
Eyal
I've created an HTML S-control which calculates some fields and display the sum of those fields.
The thing is that I need to store those fields in a parmenant
 
Code:
<html>
<head>
<script type="text/javascript" src="/soap/ajax/10.0/connection.js"></script>

<script text="javascript">
var aid="{!Class__c.Id}"; 

 
I recently asked here about the ability to share campaigns and been told the campaign sharing will only be available in winter 08 edition.
 
I wanted to know if there is another way to limit a user in a way that he would only be able to edit the campaigns he created. I don't care if he can see the campaigns of other users, I just don't want him to able to edit them.  Is it possible?
 
Thanks
Eyal
I've just finished developing some custom application for one of my clients.
 
In the current customer salesforce account there some custom fields that he added, that contains data that now should be stored in my new custom fields.
 
Is there any way to automatically transfer data from certain fields to certain fields? or should I write an external application that transfers the data between the "old" and "new" fields?
 
Thanks
Eyal
I've created a new custom object called "Class Registrations". I've created a new button called "create registration record" that once clicked on creates a new record for my custom object.
 
I've used Javascript to do it, this is the code I used:
 
Code:
<script language="JavaScript">
function redirect() 
{
parent.frames.location.replace( "/a0H/e—retUTL=/{Opportunity.id}" 
+ "&00N60000001K1qM={!Opportunity.Class_Price__c}" + "&save=0");
}
redirect();
</script>

 
Hi all,

i'm trying to create a workflow or formula field for implementing the following logic:
in my org we define the role in the following way - "Role Description - Location", i.e. "Education Counselor- Boston"

i've created a custom text field inside the lead object which called "location__c"
i'm trying to cut only the location part from the owner role and paste it into this location field. i want to do it every time a lead is created or edited.

for example: for a lead with an owner role of "Education Counselor- Boston" the location field should be "Boston".

Any help with that will be greatly appreciated.

Thanks
Eyal
Hello Everyone
 
I'm trying to create a list button that will apply manual sharing on multiple records  (kind of like what the "Change owner" button is doing).
I've tried to directly create records in the "Object__Share" table. Here is the code:
 
Code:
<html>
<head>
<script src="/soap/ajax/11.1/connection.js"></script>
<script src="/desktop/desktopApi.js"></script>
<script>

// Create an instance of a custom_object
var new_Custom_Object = new sforce.SObject("Class_Registraion__Share");

new_Custom_Object.ParentId = {!$User.Id};
new_Custom_Object.AccessLevel = 'Read';
new_Custom_Object.RowCause = 'Rule';// change value of object
new_Custom_Object.UserOrGroupId = '00G30000000hMJkEAM'; 

// Create the Object
 try
 {
  var saveResult = sforce.connection.create( new_Custom_Object );
  // Check to see that the object was created successfully
  if ( saveResult[0].getBoolean("success") )
  {
     alert( "Success  " );
  }
  else
  {
    alert( "Error occurred: " + saveResult[0] );
  }
//}
</script>
</head>
<body onload="init()">
<p>&nbsp;
</p>
</body>
</html>

when i run this nothing happens - it just giving me blank screen...
 
I've also tried using {Action.Object__c.Sharing} inside an s-control or directly on the button with "Execute Javascript" but i cannot seem to get it work.
 
does anyone have any expirience with it or did something similar?
 
Any answer will be much appriciated
Eyal
Hello everyone,
 
Is anyone knows if it's possible to make the "Campaign History" section inside the contact screen read only?
 
I'm looking for a way to only let my users to insert data but not to update it or delete it.
 
Any leads on this one will be much appriciated.
 
Thanks
Eyal
Hello,
how can I create a mass email (custom?) button to a list view in a custom object list or in the custom object itself?
What I would like to do is to basically send a mass email to my registrants in my object "event" and or/attendees/registrants.
 

Many Thanks in advance!
Markus Bleichner
Hi everyone,
 
Does anyone knows if it possible to control the sort insdie the a lookup field list.
the problem my customers have is that they really got alot of results inside that list and a sorting by date could really help them.
 
so if anyone can help me with that one i will really appricate it.
 
Thanks
Eyal
hey guys,
I was suppose to upload an application that i've wrote today and i have a really big problem with code coverage and testing.
i've wrote this trigger that does something with my custom objects.
trigger Check_Sold_Out on Class_Registration__c (after delete) { Class_Registration__c[] Current = Trigger.old; Class__c current_class = [select Id,Sold_Out__c from Class__c where Id=:Current[0].Class__c for update]; Class__C[] Classes= [select Name,Seat_Capacity__c, Location__c,Class_Date__c from Class__c where Id=:Current[0].Class__c ]; User[] Users= [select Email from User where Id=:Current[0].OwnerId ]; Integer Reg_Num = [select Count() from Class_Registration__c where Class__c=:Current[0].Class__c and Registration_Status__c <> 'Cancelled' and Registration_Status__c <> 'Waiting List' ]; if (Reg_Num < Classes[0].Seat_Capacity__c){ current_class.sold_out__c = false; update current_class;} }

i wrote this apex class for testing:
public class Check_Sold_Out {

 static testMethod void myTest()
 {
  Class_Registration__c Current = [select Id from class_registration__c where Registration_Notes__c='1'];
  delete Current;
  }

}
 
 
now the thing is that i'm not sure what i should do with it. i run it and it said that i've got 100% code coverage,
but when i'm trying to upload the package it says that i've got no test method defined for this trigger.
i must be missing something here. i am really deseprate for any kind of help as i'm late on the rollout schedule.
 
any kind of help would be really appricated!!! 
 
I also be glad to pay someone for helping me with this -i need help ASAP.
 
Thanks
Eyal
 
Hi All
 
I've created a new custom field inside the opportunity object, this custom field is a picklist.
I'm trying to create the following workflow: when an opportunity is created or edited i want to update the opportunity name with the value that was choosen in this picklist.
 
I've created a workflow that runs after opportunity is created/changed and created a new workflow action in which i'm trying to update the opportunity name. the problem is that when i'm trying to select this picklist name i'm getting the following error:
 
Error: Field Generic_Class_Type__c is a picklist field. Use it with an ISPICKVAL() or CASE() function instead.
 
I don't understand why should i use ISPICKVAL, i only want the opportunity name to be updated with the value that was selected in this picklist (no matter what that value is).
 
Thanks Alot for your help
Eyal
Hi all,
 
Is there any way to redirect the user to another URL once a record is updated?
 
I've created a new custom object, i've a "after update" trigger for this custom object and in this trigger i'm trying to redirect the user to another location if a certain condition that i defined is happening.
 
I would really appriciate any lead or idea for solving this as i really need a solution for this real quick.
 
Thanks alot
Eyal
Hi All
 
I have written a S-control to update a field.
 
The Problem is 'it is not working for few profiles'. What might be the reason.
 
Can anyone help in this.
 
Thanks in Advance
Anand
Hi everyone,
 
I'm looking for a way for creating a custom tab that will dislpay a certain URL, I remember that I bumped into a PDF that describes how to do that but I can't find it now.
 
Can someone explain me how to do that or direct me to the right PDF that describe how to do that?
 
Any help will be much appreciated,
Eyal
Is there a way to add a custom button that automatically creates a new record in specific object.
 
For example:
I created a new custom object called "Invoices". I want to create a new button on the opportunity form that once clicked on- creates a new record on the "Inovices" custom object- using the data from the current opportunity record.
 
Is it possible to do such thing using Javascript?
 
Thanks,
Eyal