• JVIowa
  • NEWBIE
  • 50 Points
  • Member since 2008

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 17
    Replies

Hi,

 

i am creating a managed package in a developer org. i have created a namespace and added all the required components to the packge and trying to upload the package. but i am getting an error message as :

 

Upload Failed A change was made to the package after the upload was initiatedUpload the package again.
 
i didnt do any changes after pakage uploading is initiated. please let me know what could be the possible error. its urgent for me i have to deliver package to client today. 
 
 
Regards,
Rakesh
We have a visualforce page in a managed package that all of the sudden started giving an insufficient privileges error last week.  The page displays Tasks that are related to a custom object from the same managed package as the vf page.  The page worked fine up until last week.  We have gone through all of the standard troubleshooting for insufficient privileges errors and everything looks fine.  See this Stack Exchange post for more details, http://salesforce.stackexchange.com/questions/129867/insufficient-privileges-visualforce-page-occurs-as-system-admin
 So I am trying to update the url of a remote site specified in my managed package.  Salesforce allows me to edit the url of the remote site and everything packages fine in my packaging org.  I am making this change within a patch package.  However when I push the patch to one of the orgs with my package installed it doesn't update.  The remote site url remains unchanged in the client's org.  It is still set to the old value.  Any idea how to update it?  Maybe post install script if possible?  Do I just need to add a redirect on my endpoint so that existing orgs will be redirected to the new remote site automatically.  Not sure what the best thing to do is.  Anyone else ran into this issue?
  • August 11, 2014
  • Like
  • 0

I am having trouble with a Publisher Action that I have added to the Account Page.  The publisher action is a Create a Record action.  The Create a Record action is creating a record with an object type that comes from my managed package.  There is a trigger behind this object and the trigger updates some fields on the object.  It appears that there is some namespacing issues in the Salesforce logic that is creating this record.  The interesting thing is that if I create the record using the standard Salesforce UI (clicking the new button and saving the record) my trigger works fine.  So there is something different about how the Publisher Action is creating the record than the standard UI.  I can tell this also because the debug log says the operation is  'chatter/handlers/quickcreate' when I create from the Publisher Action and it is the /objecttoken/e when I create with the standard UI. 

 

I think this is more of underlying Salesforce issue since the trigger is fine under the standard UI create but fails under the publisher action.  So hopefully one the Salesforce engineers can dig into this a little deeper. The error the publisher UI is throwing up is a DMLException that says "bad field names on insert/update call".  The field names are not bad and have worked for over a year, though the fields are defined in the managed namespace.  Anyway, very werid behavior and not consistent across the Salesforce application.

 

Please help!  I would really love to use the Publisher Actions as an option for users to create records.

We have a custom object that has a trigger behind it.  The trigger causes an update to an object after some other logic is done.  I don't believe any of that is important for the purposes of this issue.  The issue occurs if we try to create the record through a Chatter Action.  If we create the record the standard way (clicking the new button from the custom objects tab filling out the fields and clicking save) everything works fine.  If we try to create the record using a Chatter Action from a different custom object we get an error message (pasted below with non-essential data removed).  The error messages seems to point toward a security issue but everything looks fine and we can create the record the standard way so that shouldn't be the issue.  Does anyone know if Chatter Actions executes under a different user context than the standard record creation.  Kind of at a loss on this one since we are able to create the record through the standard mechanisms just not Chatter Actions...  I see from the debug log that when you create a record with chatter actions the operation says "chatter/handlers/quickcreate" so wonder if there is an issue there...

 

Error: Invalid Data.

 

first error: INVALID_FIELD_FOR_INSERT_UPDATE, FSTR__Business_Process__c: bad field names on insert/update call: FSTR__Status__c, FSTR__Completed_Date__c: [FSTR__Status__c, FSTR__Completed_Date__c]

I have logged a case but wanted to see what the community could figure out as well.

 

I have a set of business hours defined with no Sunday and no Saturday hours. The rest of the days have a 24 hour schedule. I am testing the code below in the developer console to make sure it works correctly. I am getting inconsistent results. I am using a start date of 3/27/2013 and trying to add 3 business days in one case and subtract 3 business days in another. This should give me a result of 4/1/2013 in the addition case and 3/22/2013 in the subtraction case. This is using the assumption that there are no business hours on Saturday and Sunday. What is actually happening is in the addition case as long as I use a starting time of 1 minute after midnight it works fine. If I set to anything less than that like midnight exactly it gives me an incorrect result. In the case of subtraction is is actually giving me a date of 3/23/2013 which is a Saturday which is not correct since there are no business hours on Saturday. Not sure what is going on here but this is not coming up with the correct date in both cases.

Run this in the developer console:
BusinessHours stdBusinessHours = [select id from businesshours where name = 'Name of Your Business Hours record with no hours on Saturday and Sunday and 24 hour days the rest of the week'];

if ((stdBusinessHours != NULL)) {
DateTime dt = Datetime.newInstance(2013, 3, 27, 0 , 1, 0);
System.debug(dt);
System.debug(BusinessHours.addGMT (stdBusinessHours.id, dt, 3 * 24 * 60 * 60 * 1000L).format());
System.debug(BusinessHours.addGMT (stdBusinessHours.id, dt, -3 * 24 * 60 * 60 * 1000L).format());
}

Results:

27.0 APEX_CODE,FINEST;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WORKFLOW,INFO
Execute Anonymous: BusinessHours stdBusinessHours = [select id from businesshours where name = 'ProcessComposer'];
Execute Anonymous:
Execute Anonymous: if ((stdBusinessHours != NULL)) {
Execute Anonymous: DateTime dt = Datetime.newInstance(2013, 3, 27, 0 , 1, 0);
Execute Anonymous: System.debug(dt);
Execute Anonymous: System.debug(BusinessHours.addGMT (stdBusinessHours.id, dt, 3 * 24 * 60 * 60 * 1000L).format());
Execute Anonymous: System.debug(BusinessHours.addGMT (stdBusinessHours.id, dt, -3 * 24 * 60 * 60 * 1000L).format());
Execute Anonymous: }
17:35:16.034 (34364000)|EXECUTION_STARTED
17:35:16.034 (34377000)|CODE_UNIT_STARTED|[EXTERNAL]|execute_anonymous_apex
17:35:16.034 (34494000)|VARIABLE_SCOPE_BEGIN|[1]|stdBusinessHours|BusinessHours|true|false
17:35:16.034 (34998000)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:11
17:35:16.035 (35207000)|STATEMENT_EXECUTE|[1]
17:35:16.035 (35214000)|STATEMENT_EXECUTE|[1]
17:35:16.035 (35227000)|HEAP_ALLOCATE|[1]|Bytes:59
17:35:16.035 (35242000)|HEAP_ALLOCATE|[1]|Bytes:4
17:35:16.035 (35581000)|SOQL_EXECUTE_BEGIN|[1]|Aggregations:0|select id from businesshours where name = 'ProcessComposer'
17:35:16.040 (40857000)|SOQL_EXECUTE_END|[1]|Rows:1
17:35:16.040 (40880000)|HEAP_ALLOCATE|[1]|Bytes:8
17:35:16.040 (40896000)|HEAP_ALLOCATE|[1]|Bytes:29
17:35:16.041 (41010000)|HEAP_ALLOCATE|[1]|Bytes:8
17:35:16.041 (41027000)|HEAP_ALLOCATE|[1]|Bytes:39
17:35:16.041 (41117000)|HEAP_ALLOCATE|[1]|Bytes:8
17:35:16.041 (41171000)|VARIABLE_ASSIGNMENT|[1]|stdBusinessHours|{"serId":1,"value":{"Id":"01m70000000Tw2DAAS"}}|0x3c719eea
17:35:16.041 (41183000)|STATEMENT_EXECUTE|[3]
17:35:16.041 (41187000)|STATEMENT_EXECUTE|[4]
17:35:16.041 (41220000)|SYSTEM_METHOD_ENTRY|[4]|Datetime.newInstance(Integer, Integer, Integer, Integer, Integer, Integer)
17:35:16.041 (41255000)|SYSTEM_METHOD_EXIT|[4]|Datetime.newInstance(Integer, Integer, Integer, Integer, Integer, Integer)
17:35:16.041 (41274000)|VARIABLE_SCOPE_BEGIN|[4]|dt|Datetime|false|false
17:35:16.041 (41351000)|VARIABLE_ASSIGNMENT|[4]|dt|"2013-03-27T05:01:00.000Z"
17:35:16.041 (41360000)|STATEMENT_EXECUTE|[5]
17:35:16.041 (41385000)|SYSTEM_METHOD_ENTRY|[5]|System.debug(ANY)
17:35:16.041 (41410000)|USER_DEBUG|[5]|DEBUG|2013-03-27 05:01:00
17:35:16.041 (41420000)|SYSTEM_METHOD_EXIT|[5]|System.debug(ANY)
17:35:16.041 (41424000)|STATEMENT_EXECUTE|[6]
17:35:16.041 (41569000)|HEAP_ALLOCATE|[6]|Bytes:12
17:35:16.041 (41587000)|HEAP_ALLOCATE|[6]|Bytes:12
17:35:16.041 (41652000)|SYSTEM_MODE_ENTER|false
17:35:16.041 (41670000)|HEAP_ALLOCATE|[6]|Bytes:5
17:35:16.041 (41762000)|SYSTEM_METHOD_ENTRY|[6]|system.BusinessHours.addGmt(Id, Datetime, Long)
17:35:16.042 (42772000)|SYSTEM_METHOD_EXIT|[6]|system.BusinessHours.addGmt(Id, Datetime, Long)
17:35:16.042 (42785000)|SYSTEM_MODE_EXIT|false
17:35:16.042 (42817000)|SYSTEM_METHOD_ENTRY|[6]|Datetime.format()
17:35:16.042 (42882000)|HEAP_ALLOCATE|[6]|Bytes:17
17:35:16.042 (42892000)|SYSTEM_METHOD_EXIT|[6]|Datetime.format()
17:35:16.042 (42905000)|SYSTEM_METHOD_ENTRY|[6]|System.debug(ANY)
17:35:16.042 (42911000)|USER_DEBUG|[6]|DEBUG|4/1/2013 12:01 AM
17:35:16.042 (42919000)|SYSTEM_METHOD_EXIT|[6]|System.debug(ANY)
17:35:16.042 (42924000)|STATEMENT_EXECUTE|[7]
17:35:16.042 (42943000)|HEAP_ALLOCATE|[7]|Bytes:12
17:35:16.042 (42952000)|HEAP_ALLOCATE|[7]|Bytes:12
17:35:16.042 (42998000)|SYSTEM_MODE_ENTER|false
17:35:16.043 (43007000)|HEAP_ALLOCATE|[7]|Bytes:5
17:35:16.043 (43020000)|SYSTEM_METHOD_ENTRY|[7]|system.BusinessHours.addGmt(Id, Datetime, Long)
17:35:16.043 (43151000)|SYSTEM_METHOD_EXIT|[7]|system.BusinessHours.addGmt(Id, Datetime, Long)
17:35:16.043 (43161000)|SYSTEM_MODE_EXIT|false
17:35:16.043 (43180000)|SYSTEM_METHOD_ENTRY|[7]|Datetime.format()
17:35:16.043 (43197000)|HEAP_ALLOCATE|[7]|Bytes:18
17:35:16.043 (43204000)|SYSTEM_METHOD_EXIT|[7]|Datetime.format()
17:35:16.043 (43217000)|SYSTEM_METHOD_ENTRY|[7]|System.debug(ANY)
17:35:16.043 (43222000)|USER_DEBUG|[7]|DEBUG|3/23/2013 12:01 AM
17:35:16.043 (43229000)|SYSTEM_METHOD_EXIT|[7]|System.debug(ANY)
17:35:16.294 (43270000)|CUMULATIVE_LIMIT_USAGE
17:35:16.294|LIMIT_USAGE_FOR_NS|(default)|
Number of SOQL queries: 1 out of 100
Number of query rows: 1 out of 50000
Number of SOSL queries: 0 out of 20
Number of DML statements: 0 out of 150
Number of DML rows: 0 out of 10000
Number of code statements: 5 out of 200000
Maximum heap size: 0 out of 6000000
Number of callouts: 0 out of 10
Number of Email Invocations: 0 out of 10
Number of fields describes: 0 out of 100
Number of record type describes: 0 out of 100
Number of child relationships describes: 0 out of 100
Number of picklist describes: 0 out of 100
Number of future calls: 0 out of 10

17:35:16.294|CUMULATIVE_LIMIT_USAGE_END

17:35:16.043 (43304000)|CODE_UNIT_FINISHED|execute_anonymous_apex
17:35:16.043 (43311000)|EXECUTION_FINISHED

  • March 29, 2013
  • Like
  • 0

We have a native force.com app we have developed and would like to patent.  Has anyone been through this process for a force.com app?  Could you share your experience and contact information for a conversation?

  • March 28, 2013
  • Like
  • 0

Any idea why this query would cause an issue?  Create Date should be an indexed field and there is a limit on the query.  Is it because of the Aggregate? Grouping?  Can't figure out what the problem is. If I decrease the limit, that doesn't fix the problem either.  So it has something to do with  the fact that it is attempting this on the task table.  This is a 100 user org that has a fair amount of tasks create in it.  Any ideas?

 

 AggregateResult[] groupedResults = [SELECT COUNT(id), ownerid 
                                    FROM task where custom_field__c != null 
                                    and createddate = LAST_N_DAYS:365 group by ownerid limit 25000];
            integer distinctUsers = 0;
            integer totalTasks = 0;
            set<id> userIds = new set<id>();
            for (AggregateResult ar : groupedResults)  {  
                if(ar.get('ownerid') != null){
                    userIds.add((string)ar.get('ownerid'));
                    distinctUsers++;
                    totalTasks += Integer.valueof(ar.get('expr0'));
                }
                
            }

 

  • October 12, 2012
  • Like
  • 0

Does anyone know what happens if you try to install a manage package that references AccountTeamMember in an org that has Account Teams disabled?  I noticed that if you disable account teams the object disappears from the metadata. By default Account Teams is disabled.  I would guess that when you upload you can require the Account Teams feature.  I would rather not force people to turn this on if they aren't going to use it as it is an optional feature with my package.  I guess the only other way around this would be dynamic SOQL when trying to discover Account Team Members for an account.  Any other thoughts?

According to the documentation when you call getOrgDefaults on a Custom Setting it should return null if there are no Org Defaults defined.  Since the Spring 12 release this method is not returning null but instead is returning a blank object.  Try the following code from the Developer Console on a custom setting with no values defined.  This causes problems if you have code that has defaults defined in the case of the Custom Setting not being configured yet (i.e. getOrgDefaults returning NULL).

 

System.debug(YourCustomSetting__c.getOrgDefaults());

 

The debug output will look like below instead of saying Null

 

10:05:08:098 USER_DEBUG [1]|DEBUG|YourCustomSetting__c:{}

 

Has anyone else noticed this?  I am going to log a case with Developer Support as well.

 

 

  • February 14, 2012
  • Like
  • 0
I have created a dynamic SOSL Query for existing SOQL query.But I am not getting all the records which I am getting 
form SOQL query.

When I compared the records which are missing from the SOSL then I found that those missing records where Created 5 Years ago from now.
So can this be the reason for not showing the records in SOSL?
I am new to SOSL.Please guide me.
We have a visualforce page in a managed package that all of the sudden started giving an insufficient privileges error last week.  The page displays Tasks that are related to a custom object from the same managed package as the vf page.  The page worked fine up until last week.  We have gone through all of the standard troubleshooting for insufficient privileges errors and everything looks fine.  See this Stack Exchange post for more details, http://salesforce.stackexchange.com/questions/129867/insufficient-privileges-visualforce-page-occurs-as-system-admin
That the following Visualforce page is carried out by a system administrator "There are no right of accesses." An error message is indicated. Why is it?

<apex:page standardController="Research__c">
    <apex:detail subject="{!Research__c.Id}"/>
</apex:page>

There has been discussion regarding headless flows for some time. Is there any update on when this may be available OR does anyone have a possible solution they may be willing to share on this matter?

  • December 11, 2013
  • Like
  • 0

We are buiding a system that will automatically provision License Seats when a customer purchases our product from our custom store front. All of this logic is in Apex and we are trying to write tests to ensure this works correclty but it seems this may not be possible.

 

In its simplest form the test would pefrom the following:

- Create a License

- Update the Seats__c field on the license

- Assert Seat__c field was updated correctly

 

Seem simple but it doesn not appear to work as this is the error received when trying to accomplish this: 

Update failed. First exception on row 0 with id a07e0000000ySK2AAM; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Argument 1 cannot be null: []

 

Below is the code to reproduce:

 

//Create account license can be attached to
Account acct = new Account(Name = 'test');
insert acct;

//Create package
sfLma__Package__c pack = new sfLma__Package__c(
	Name = 'test',
	sfLma__Developer_Name__c = 'test',
	sfLma__Developer_Org_ID__c = 'abc',
	sfLma__Latest_Version__c = '3',
	sfLma__Lead_Manager__c = UserInfo.getUserId(),
	sfLma__Package_ID__c = '3',
	sfLma__Release_Date__c = system.today().addDays(-30)
);
insert pack;

//Create a package version
sfLma__Package_Version__c packVersion = new sfLma__Package_Version__c(
	Name = 'test',
	sfLma__Package__c = pack.id,
	sfLma__Is_Beta__c = false,
	sfLma__Release_Date__c = system.today(),
	sfLma__Sequence__c = 1,
	sfLma__Version__c = '3',
	sfLma__Version_ID__c = '3'
);
insert packVersion;

//Ceate a license record
Id recordTypeId = [select Id from RecordType where Name = 'Active' and SobjectType = 'sfLma__License__c'].Id;
sfLma__License__c lic = new sfLma__License__c(
    RecordTypeId = recordTypeId,
    sfLma__Status__c = 'Active',
    sfLma__Seats__c = 1,
    sfLma__License_Type__c = 'Editable',
    sfLma__Account__c = acct.Id,
    sfLma__Expiration__c = system.today().addDays(365),
    sfLma__Install_Date__c = system.today(),
    sfLma__Package_Version__c = packVersion.Id
);
insert lic;

//Update the Seats field on the license
lic.sfLma__Seats__c = 5;

//UPDATE FAILS
update lic;

 

Any ideas?

 

Thanks,

Jason

  • September 16, 2013
  • Like
  • 0

We have a custom object that has a trigger behind it.  The trigger causes an update to an object after some other logic is done.  I don't believe any of that is important for the purposes of this issue.  The issue occurs if we try to create the record through a Chatter Action.  If we create the record the standard way (clicking the new button from the custom objects tab filling out the fields and clicking save) everything works fine.  If we try to create the record using a Chatter Action from a different custom object we get an error message (pasted below with non-essential data removed).  The error messages seems to point toward a security issue but everything looks fine and we can create the record the standard way so that shouldn't be the issue.  Does anyone know if Chatter Actions executes under a different user context than the standard record creation.  Kind of at a loss on this one since we are able to create the record through the standard mechanisms just not Chatter Actions...  I see from the debug log that when you create a record with chatter actions the operation says "chatter/handlers/quickcreate" so wonder if there is an issue there...

 

Error: Invalid Data.

 

first error: INVALID_FIELD_FOR_INSERT_UPDATE, FSTR__Business_Process__c: bad field names on insert/update call: FSTR__Status__c, FSTR__Completed_Date__c: [FSTR__Status__c, FSTR__Completed_Date__c]

Hi,

 

i am creating a managed package in a developer org. i have created a namespace and added all the required components to the packge and trying to upload the package. but i am getting an error message as :

 

Upload Failed A change was made to the package after the upload was initiatedUpload the package again.
 
i didnt do any changes after pakage uploading is initiated. please let me know what could be the possible error. its urgent for me i have to deliver package to client today. 
 
 
Regards,
Rakesh

Any idea why this query would cause an issue?  Create Date should be an indexed field and there is a limit on the query.  Is it because of the Aggregate? Grouping?  Can't figure out what the problem is. If I decrease the limit, that doesn't fix the problem either.  So it has something to do with  the fact that it is attempting this on the task table.  This is a 100 user org that has a fair amount of tasks create in it.  Any ideas?

 

 AggregateResult[] groupedResults = [SELECT COUNT(id), ownerid 
                                    FROM task where custom_field__c != null 
                                    and createddate = LAST_N_DAYS:365 group by ownerid limit 25000];
            integer distinctUsers = 0;
            integer totalTasks = 0;
            set<id> userIds = new set<id>();
            for (AggregateResult ar : groupedResults)  {  
                if(ar.get('ownerid') != null){
                    userIds.add((string)ar.get('ownerid'));
                    distinctUsers++;
                    totalTasks += Integer.valueof(ar.get('expr0'));
                }
                
            }

 

  • October 12, 2012
  • Like
  • 0

According to the documentation when you call getOrgDefaults on a Custom Setting it should return null if there are no Org Defaults defined.  Since the Spring 12 release this method is not returning null but instead is returning a blank object.  Try the following code from the Developer Console on a custom setting with no values defined.  This causes problems if you have code that has defaults defined in the case of the Custom Setting not being configured yet (i.e. getOrgDefaults returning NULL).

 

System.debug(YourCustomSetting__c.getOrgDefaults());

 

The debug output will look like below instead of saying Null

 

10:05:08:098 USER_DEBUG [1]|DEBUG|YourCustomSetting__c:{}

 

Has anyone else noticed this?  I am going to log a case with Developer Support as well.

 

 

  • February 14, 2012
  • Like
  • 0

I recently upgraded my Force.com IDE (and all projects) to the Winter '12 release. Since upgrading, I've been observing that when I attempt to run unit tests against an Apex class, it often takes a very long time to execute. Even relatively simple tests sometimes take a minute or two to complete. The time doesn't seem to be spent during test execution, but rather during the "preparing results..." phase (based on the progress indicator in the IDE). Reducing the log level doesn't seem to have any impact one way or the other. I've also seen it simply get stuck in the "preparing results..." phase to the point where I had to kill the Eclipse process. Anyone else seeing this?

  • January 04, 2012
  • Like
  • 0

Hello Everyone,

 

I'm trying to make some files we uploaded into salesforce crm content downloadable or accessible by another page via Sites. For instance, say, an mp3, either downloaded or requested by mediaplayer on a webpage.

 

According to the docs 'To download a document via the API, you must export the VersionData of the document.'

 

Well... I've tried a couple variations with a visualforce page to retrieve/export the contentversion, but (as expected) no luck.

 

Does anyone have any good ideas on how to do this?

 

Thanks in advance,

e.