• Anil Meghnathi
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 34
    Questions
  • 41
    Replies

Hi all

 

We have one package org with package managed package name SCApp.The version of the managed package is 1.9

Now we want to release the new version 2.0.So we have completed all the part of coding in Developer org.Now we want to transfer that code of Developer org into Package org to  create new version.When we try it through package linkurl it gives too many name conflicts.

 

So how can we solve it?

Hi Pat Patterson please if you can help me.

Any idea will help us.

 

Anil Meghnathi

 

Confident Enterprise

i want to create a new unmanaged package,in which i want to add one Custom Profile created by me.

So how can i add that in to package.

Any idea will help me?

 

Thanks

 

Anil

We have an unmanged Package.And in that unmanaged package we have used Network, NetworkMember and NetworkProfile sobjects.So in our Dev Org with class version 26.0 its working fine.But when we ahve tried to install that unmanaged package in another Org they give error that  Network, NetworkMember and NetworkProfile are not supported.I dont have any idea about why it happens.Its very urgent.Any idea will help me.

 

Thanks

 

Anil Meghnathi

We have used Network object in our Dev Org with apex class 26.0 version.But after packaging during the installation in new Org,we got the error that Network Object is not supported.We have used Network object in apex classe with 26.0 version.But in this new org even  with 26.0 version, Network is not supporting.

So what should we do??Its very urgent.plese help me.

Any idea will help us???

 

 

Thanks

 

Anil Meghnathi 

I have a field ModeratorID__C with type text. Now i want  to convert Text field type into User Lookup relationship.

 

Is it possible??

 

Thanks

I tried the following query but it's not working.Any idea will help me.

 

list<BlockedUser__c> bu=new list<BlockedUser__c>();
bu=[select ID,UserID__c,Days__c,Blocking_Date__c from BlockedUser__c where Blocking_Date__c+Days__c>:System.now()];

 

Thanks 

 

Anil

hi pat

i have a problem.

I have a sobject TestStoring__c with one custom field Body__c.In after insert trigger on FeedItem ,  when i insert a record in 

TestStoring__c sobject,it is not getting inserted.I am also attaching the code below.

 

Class:

 

public class TestTriggerClass {
    public static string flag;
    public static void addFeedError(list<FeedItem> fi) {
        if(fi[0].body.contains('blocked')) {
            flag='not';
            fi[0].adderror('Not Allowed');
            return;
        } else {
            flag='done';
            return;
        }
    }
}

 

 

Trigger:

 

trigger Test on FeedItem (after insert) {
    FeedItem[] f=Trigger.New;
    TestTriggerClass.addFeedError(f);

    System.debug(TestTriggerClass.flag);
    if(TestTriggerClass.flag!='done') {
        TestStoring__c vv=new TestStoring__c();
        vv.Body__c=f[0].body;
        insert vv;
    }
}

 

 

Any idea will help me.

Thanks

 

Anil

I have a sobject TestStoring__c with one custom field Body__c.In after insert trigger on FeedItem ,  when i insert a record in 

TestStoring__c sobject,it is not getting inserted.I am also attaching the code below.

 

Trigger:

 

trigger Test on FeedItem (after insert) 
{
FeedItem[] f=Trigger.New;
TestTriggerClass.addFeedError(f);

System.debug(TestTriggerClass.flag);
if(TestTriggerClass.flag!='done')
{
TestStoring__c vv=new TestStoring__c();
vv.Body__c=f[0].body;
insert vv;
}
}

 

 

Class:

 

public class TestTriggerClass
{
public static string flag;
public static void addFeedError(list<FeedItem> fi)
{
if(fi[0].body.contains('blocked'))
{
flag='not';
fi[0].adderror('Not Allowed');
return;
}
else
{
flag='done';
return;
}
}
}

 

 

If you have any solution please help me?Its urgent.please

 

Thanks

Anil Meghnathi

I have a Trigger on FeedItem.I have inseted an Custom Object record in that trigger.After that custom object insertion when i use feed.addError('Block'); the inserted custom object will be RollBacked.Any idea how to Stop RollBack when we use addError in Trigger??

 

Please help me.Its urgent

 

Thanks

Anil 

I have an Apex Class.

I wants to alert() of javascript in that class.

Remember i dont have any visualforce page for that class.

Any method in Apex is there using which we can directly execute javascript or HTML???

 

Its urgent.Help me.

 

Thanks

Anil

When any user post something bad in chatter i want to notify him that this is not allowed by showing message box.

I have used addError() but if i use addError() the post will be cancelled.i dont want that.post must be inserted but just message should be shown.

 

 

Any idea???

 

 

Anil

i have created a new Chatter Free User.

Now i want that this Chatter Free User can update field of any object.

 

If it is possible for any field of any object please tell me.

 

 

Anil

I want to set start and end date of schedule job using apex code.

Cron Trigger has StartTime,EndTime fields but they are not writable.

How to set start and end date.

 

Any idea???

 

Thanks

Anil

While i message any thing using private message,i want to restrict that message using trigger.

 

Any idea how to make ChatterMessage object accessed any trigger.And that trigger is fired when user send any private Message.

 

 

Thanks

 

Anil

While i am posting any thing through Chatter Desktop,Trigger on FeedItem is not fired.

 

Any Idea??

How to fire that trigger???

 

 

Thanks

 

Anil

When i try to insert Chatter free user Name into a new Custom object i got the exception of OP_WITH_INVALID_USER_TYPE.

 

Any idea how to solve it???

 

Thanks

Anil

 

i have a class , which  send an email with attachment.

The attachment is content of a visualforce page.

I have set the contentType as Excel of visualforce page.

The mail is send successfully.But the content of attachment doesnt support excel file type.

So when i try to open excel file the error of not support is coming.

Instead of data the code of the visualforce page and Apex class is displayed in excel file

Any idea how to solve it.

 

Thanks

 

Anil

I want to Stop running Schedule using Apex class.

Any Idea

 

Thanks 

Anil

I Want to Extract Data of Standard Object in a excel file using Apex  class Coding.Using Visualforce page it is possible,but i want to get it through a Apex class.

 

Any idea???

 

Thanks 

anil

I wants to remove a group member from a group.I dont have sytem administrator permissions and i am not Owner of group.

 

So is it possible to do so?

 

If any setting of profile may make me do this than tell me.

 

Thanks

 

Anil 

hi pat

i have a problem.

I have a sobject TestStoring__c with one custom field Body__c.In after insert trigger on FeedItem ,  when i insert a record in 

TestStoring__c sobject,it is not getting inserted.I am also attaching the code below.

 

Class:

 

public class TestTriggerClass {
    public static string flag;
    public static void addFeedError(list<FeedItem> fi) {
        if(fi[0].body.contains('blocked')) {
            flag='not';
            fi[0].adderror('Not Allowed');
            return;
        } else {
            flag='done';
            return;
        }
    }
}

 

 

Trigger:

 

trigger Test on FeedItem (after insert) {
    FeedItem[] f=Trigger.New;
    TestTriggerClass.addFeedError(f);

    System.debug(TestTriggerClass.flag);
    if(TestTriggerClass.flag!='done') {
        TestStoring__c vv=new TestStoring__c();
        vv.Body__c=f[0].body;
        insert vv;
    }
}

 

 

Any idea will help me.

Thanks

 

Anil

 

Hi All,

I am new to apex triggers, but somehow I managed to create a trigger that works.. I am having more trouble creating a Test Class that reaches 75% of code coverage.. my Test Class sticks at 0% coverage :-(

my trigger fires after the creation of a custom object, called Case.. the trigger inserts a Case Leadtime record in the related list on Case (the case leadtime record is then filled with workflow rules to track the leadtime per department for management reporting ).

This is the trigger:

 

trigger createLeadtime on Case__c (after insert)
{

List<Case_Leadtime__c> cl = new List<Case_Leadtime__c>();
for (Case__c newCase_Leadtime: Trigger.New)
cl.add (new Case_Leadtime__c(
Case__c = newCase_Leadtime.Id));
insert cl;
}

 

 

In the Test Class I have intended to first create a Case and then to create a related Case Leadtime

 

This is the test class:


@isTest
private class TestcreateLeadtime {

static testMethod void TestcaseLeadtime () {

Case__c a = new Case__c ();
a.Account__c = [select Id from Account limit 1].Id;
a.Issue_Type__c = 'Customer Claim';
a.Office__c = [select Id from Office__c limit 1].Id;
a.Case_Created_By__c = 'Test';
a.Assigned_To__c = [select Id from User limit 1].Id;
a.Status__c = 'Open';
a.Complaint_Subject__c = 'Miscellaneous';
a.Change_Flag__c = true;
a.Proposed_Solution__c = 'Discount/Compensate By Credit Note';
insert a;

Case_Leadtime__c[] cl = new Case_Leadtime__c []{
new Case_Leadtime__c (Case__c = a.id)};
insert cl;


test.startTest();
insert cl;
test.stopTest();
}

}

 

------

 

Hope someone can help

 

Thanks

 

We have an unmanged Package.And in that unmanaged package we have used Network, NetworkMember and NetworkProfile sobjects.So in our Dev Org with class version 26.0 its working fine.But when we ahve tried to install that unmanaged package in another Org they give error that  Network, NetworkMember and NetworkProfile are not supported.I dont have any idea about why it happens.Its very urgent.Any idea will help me.

 

Thanks

 

Anil Meghnathi

From a best practice perspective, should the test class have any Try...Catch blocks or are all of these in the production classes and Triggers?

 

It seemed to me like the test class should not have Try...Catch blocks but I keep seeing these in examples.  Isn't purpose of these so the code catches them?

 

Thanks!

Hi,

 

I have a requirement to automatically check the checkbox based on the leads names?

 

How can i do that through coding?

 

 

Hii,

        Can any one suggest me how i can use static list to access wrapper class variables in visualforce page 

  • November 06, 2012
  • Like
  • 0

Hi,

 

I am getting an error attemptiong to de-reference null object.

 

Can anyone please guide?

 

List<Sub_Proj__c> approvals = [select Id  FROM
                      Sub_Proj__c WHERE ID = :projectDetail.Id];

       if(approvals.isEmpty())
       {
          ApexPages.Message myMsg = new ApexPages.Message(ApexPages.
Severity.ERROR,'Approvals are not present');
                                                    
            ApexPages.addMessage(myMsg);
            return null;
       }
       else
       {
                 if(Projectdeatil.name!=null){
         // do rest work
           }
      
        }
   return returnPage;
    }

Hii all,

 

I want to create a site in fb just like a blog ....

how do i do it using visual force ????

 

-

Sneha 

Hi ,

 

i have created Email template in salesforce and i want to send the escalation mail to users after some time intervals.

so how can i send the Email Notification template to users after certain period of time based on some conditions?

 

Thanks

hii

 i wanted to export my data to csv 

anyone who can help me in this task.

 

this is my page when i click on export button  '/apex/googleChartsCSV 

 

<td><input id="exportCSV" type="button" onclick="window.open('/apex/googleChartsCSV?nam=' + Name + '&was=' + Waste + '&day=' +Days);" value="Export to CSV" style="display: none;"></input></td>

 

for(var i=0; i<result.length;i++){
var finalBean1= result[i];
if(finalBean1.AccName != null && finalBean1.WasteName != null && finalBean1.DaysTotal != null)
{
Names.push(finalBean1.AccName);
Wastes.push(finalBean1.WasteName);
Day.push(finalBean1.DaysTotal);

}
}
if (Names.length > 0) {
Name = Names.join(',');
Waste = Wastes.join(',');
Days = Day.join(',');
document.getElementById('exportCSV').style.display = 'block';
}

 

but the problem is when the page opens '/apex/googleChartsCSV it is having a very large query string with 1000 of values in Name variable 

 

any idea how can i use query string for showing all the values in excel

  • October 23, 2012
  • Like
  • 0

i have a problem of getting error message at the wrong time

 

Date From: 01/06/2011 - Date To: 12/09/2012 - show me data
we would say 'sorry, your services were not active 01/06/2011'
 becasue service start date  is 01/01/2012


for this i have applied this error message

if(dateFrom < sr.Service_Start_Date__c){
      ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error,'Service is Not Active'));
      return null;
}

 

But i have more than 1 service start date

8/1/2011

16/9/2010

1/8/2011

4/5/2010

11/1/2012

1/12/2011

15/11/2010

25/7/2011

27/10/2010

 

so when i entered DateFrom = 1/1/2012

it is showing me the error message 

any help

  • October 10, 2012
  • Like
  • 0

i have a variable name countdays

String Countdays = ' ' ;

 

in debug it is having values like this

========CountDays===========40,40,40,39,39,39 and so on

 

how to sum it and get the total i.e = 40+40+40+39+39+39....... = 

 

please share your ideas with me

  • October 04, 2012
  • Like
  • 0

i have a multiselect list with values as this 

Days_collection__c = Monday am

                                        Monday pm

                                        Monday overnight 

                                        Tuesday am

                                                         pm

                                                         overnight

                                        Wednesday am

                                                               pm

                                                               overnight

and so on 

but i want to only week days from this list not with am,pm,overnight

but this is a multiselect list   so sometimes i have vallues like

        monday am,tuesday pm,wednesday,om,thrusday overnight,friday pm

how can i get only week days 

  • September 28, 2012
  • Like
  • 0

i have used this datepicker. wanted to show my selected date in the apex controller

 

<td> Date<br></br><input id="t" name="datee" onfocus="DatePicker.pickDate(false,

't', false);" size="12" tabindex="28" type="text" /></td>

 

 I am not able to pass the selected date to the apex controller.. could you help me on this :)

  • September 18, 2012
  • Like
  • 0
Is it possible to deploy new/custom profiles as part of a package?
 
I was able to add my 2 custom profiles to my package, but they are only useful when the Administrator installs the package and grants security for the new installation.
 
I was hoping that my package could create 2 new custom profiles in the installed org.
 
Does anyone know if that's possible?
 
Thanks,
Brian
Hi,
 
I am interested to know if the following can be packaged and uploaded (to be part of the downloadable app), and if so how:
 
1) Workflow rules, tasks, alerts
2) Email templates
3) Customized page layouts of standard objects (such as Opportunity)
4) New profiles created to specify access/security settings on custom/standard objects - I was able to upload Profile settings but while mapping the setting to an existing profile on the downloading account, does all local settings of that local profile get overwritten by the mapped profile setting? If not how would this work?
 
I would also like to know about the recommendation regarding custom app packaging - should the package have only the custom app which in turn should be associated to all custom items (such as objects, links, s-controls, tabs) or should each of these also be included individually in the package?
 
I would greatly appreciate information on the same.
 
Thanks,
VSP.
  • October 13, 2006
  • Like
  • 0