• Imposter
  • NEWBIE
  • 30 Points
  • Member since 2012

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 8
    Replies

Hi,

 

I am writing triggers for an app, and I need to know how to get an email or ID that uniquely identifies the overall account, not just a user - and when I say "account" I DO NOT mean the object inside Salesforce that represents someone a user is trying to sell to - I'm talking about the person who pays Salesforce.com as a customer.

 

I'm writing an app that interacts with an external service.  The service is sold per-user, so I need to be able to tie individual users to an overall salesforce account.  When an admin wants to entitle of their users to use a purchased slot on our service, I need to be sure they haven't exceeded the number of users they've purchased.

 

Sorry if this post was confusing.. lol  I'm trying my best, I promise.

 

Thanks!

Hey Geeks,

I am trying to deploy a page layout from my dev org to a production org.

 

The production org contains a managed package (installed from appExchange).

While running all tests, the managed package shows 3 test failures. There is no other custom code in the org.

 

My deployment is failing due to package errors. I believed the managed packages errors, don't affect local deployments. Has this been modified in latest release ?

 

It would be great, if somebody can confirm !

 

Thanks

 

 

 

Hello Community !

I am trying to use polymorphic keys in DataLoader with Bulk API, but I am receving error, that Id value is malformed. Any anybody travelled this path before.

 

Details

DataLoader version : 21.0 with Bulk API enabled.

Trying to run migrate task data from one sandbox to another

 

CSV file

Subject,Priority,Status,Lead:Who.Email,Owner.Id
Test Bulk API polymorphic reference field,Normal,Not Started,lead@salesforcesample.com,005D0000001AXYz

 

Any pointers will be greatly appreciated.

 

Thanks,

i am trying to parse a response which is a json object in this json object there is a token with name items and whose value is a json array how to parse this json array

 

my json object is 

 

{
 "kind": "calendar#calendarList",
 "etag": "\"ZrhdJMCgpoUK_a5fT7XOC6xn46g/plXZGPvcPHrJh8umego5vRMYLrw\"",
 "items": [
  {
   "kind": "calendar#calendarListEntry",
   "etag": "\"ZrhdJMCgpoUK_a5fT7XOC6xn46g/_sj3j6dReaKvgLTRpRDkSz1mIAU\"",
   "id": "#contacts@group.v.calendar.google.com",
   "summary": "Contacts' birthdays and events",
   "description": "Your contacts' birthdays and anniversaries",
   "timeZone": "Asia/Calcutta",
   "colorId": "12",
   "backgroundColor": "#fad165",
   "foregroundColor": "#000000",
   "selected": true,
   "accessRole": "reader"
  },
  {
   "kind": "calendar#calendarListEntry",
   "etag": "\"ZrhdJMCgpoUK_a5fT7XOC6xn46g/wnz2e6fAz2dY8LnmrEb74dwcspc\"",
   "id": "en.indian#holiday@group.v.calendar.google.com",
   "summary": "Indian Holidays",
   "description": "Indian Holidays",
   "timeZone": "Asia/Calcutta",
   "colorId": "15",
   "backgroundColor": "#9fc6e7",
   "foregroundColor": "#000000",
   "selected": true,
   "accessRole": "reader"
  },
  {
   "kind": "calendar#calendarListEntry",
   "etag": "\"ZrhdJMCgpoUK_a5fT7XOC6xn46g/hlANK5jBgx_YHUEAnXhn6WANZ4A\"",
   "id": "ritesh@iritesh.com",
   "summary": "ritesh@iritesh.com",
   "timeZone": "Asia/Calcutta",
   "colorId": "9",
   "backgroundColor": "#7bd148",
   "foregroundColor": "#000000",
   "accessRole": "owner",
   "defaultReminders": [
    {
     "method": "popup",
     "minutes": 10
    }
   ]
  }
 ]
}

 

now for parsing i am using code

   Map<String, Object> m = 
   (Map<String, Object>)
      JSON.deserializeUntyped(re); //re is response body string
List<Object> a = 
   (List<Object>)m.get('items');
   System.debug(String.valueOf(a.get(0)));
   Map<String, Object> m1 = 
   (Map<String, Object>)
      JSON.deserializeUntyped(String.valueOf(a.get(0)));
 System.debug('Summary is'+m1.get('summary'));

 

  System.debug(String.valueOf(a.get(0))); returning

{accessRole=reader, backgroundColor=#fad165, colorId=12, description=Your contacts' birthdays and anniversaries, etag="ZrhdJMCgpoUK_a5fT7XOC6xn46g/_sj3j6dReaKvgLTRpRDkSz1mIAU", foregroundColor=#000000, id=#contacts@group.v.calendar.google.com, kind=calendar#calendarListEntry, selected=true, summary=Contacts' birthdays and events, ...}

when i run this code i am getting error  

FATAL_ERROR|System.JSONException: Unexpected character ('a' (code 97)): was expecting double-quote to start field name at [line:1, column:3]

  because accessrole is ot surrounding with double quotes i am getting this error can any one please help how to get summary field from json array please provide a suitable method for parsing the response??

 

 

Hey Geeks,

I am trying to deploy a page layout from my dev org to a production org.

 

The production org contains a managed package (installed from appExchange).

While running all tests, the managed package shows 3 test failures. There is no other custom code in the org.

 

My deployment is failing due to package errors. I believed the managed packages errors, don't affect local deployments. Has this been modified in latest release ?

 

It would be great, if somebody can confirm !

 

Thanks

 

 

 

Hi guys,

I have a code that is creating some Apex Managed Sharing rules, the problem is that this code is executed by the users that don’t have the permission “Modify all data”, and then the sharing rules are not created.

Is there anyway that a User that has a profile without the permission “Modify all data” can create/edit Apex Managed Sharing Rules?
Because this permission is too wide to freely give it to users, so I was wondering if there is any other permission that you can give, a bit more restrictive, but that will allow the users to create sharing rules.

If the previous option is not possible, is there a way to make a piece of code to be executed by another user, like the System.runAs() that you can use in the testmethods?

Thanks a lot!

I was trying to migrate a criteria based sharing rule for Case with Force.com Migration Tool.  Here's the part in package.xml:

 

	<types>
		<members>Share_to_BIT</members>
		<name>criteriaBasedRules</name>
	</types>

 The tool complains about it:

[sf:retrieve] package.xml - Unknown entity:criteriaBasedRules

 

Anyone has an idea what I'm missing here?  The Ant tool I used is version 25.

Hi,

 

I am writing triggers for an app, and I need to know how to get an email or ID that uniquely identifies the overall account, not just a user - and when I say "account" I DO NOT mean the object inside Salesforce that represents someone a user is trying to sell to - I'm talking about the person who pays Salesforce.com as a customer.

 

I'm writing an app that interacts with an external service.  The service is sold per-user, so I need to be able to tie individual users to an overall salesforce account.  When an admin wants to entitle of their users to use a purchased slot on our service, I need to be sure they haven't exceeded the number of users they've purchased.

 

Sorry if this post was confusing.. lol  I'm trying my best, I promise.

 

Thanks!

Hi,

 

In Spring '11 release, criteria based sharing was introduced. We have tried using this feature and would like to know if this can be deployed via eclipse. Since we have setup too many rules.

 

Thanks for those who will reply. ^_^

 

Mikka

  • May 18, 2011
  • Like
  • 0

for example I have this string LONG-08080-aSDDdd-001

how do I get the end of the string after the last "-" : note that 001 could also be 00000001, 0100000 etc.. so not only 3 chars long