• pucca0519
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Our Lighting Components for Visual Force (LC4VF) held in a Visualforce page is not rendering a group of components.  The error message is "This page has an error. You might just need to refresh it. Assertion Failed!: Failed to find definition for dependency: lightning-icon : undefined Failing descriptor {lightning:inputRichText}". The component renders fine in a Summer '17 sandbox, but not in a Winter '18 sandbox.

We opened a ticket with Salesforce and waiting to hear back from. Just wondering if anyone else is experiencing this.

Hi -

 

In our instance, Account is set to private. We have sharing rules to share accounts by criteria. For example, grant read /write access to all account of AS record type with Role: AS. We load data using an application user named "Migration User" who is assigned to the System Administrator role. By default, all loaded accounts will be owned by the Migration User. We have a custom application that perform account merging. One of the steps is to clone and recreate Notes & Attachments because there isn't a way to re-parent these records to the master Account. When an AS user tries to merge two accounts, the cloning step is failing if there are Notes & Attachments owned by the Migration User.  This is the error that we're getting:

 

INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: []. 

 

However, this same user can create new and/or edit existing Notes record owned by the Migration User.

 

Here is the snippet of code where notes are collected for cloning.

 

public static list<Note> getNoteToMerge(list<Account> masterList, List<Account> aList)
{
list<Note> nList = new list<Note>();

for(Note n : [SELECT Id, OwnerId, isPrivate FROM Note WHERE ParentId IN :aList])
{
/* query note and then clone it */
String idStr = 'id=' + '\'' + n.Id + '\'';
system.debug(LoggingLevel.Info, '***************************** idStr: ' + idStr);
String soql = getCreatableFieldsSOQL('note', idStr);
Note result = (Note)Database.query(soql);
Note cloneNote = result.clone(false, true, true, false);
cloneNote.ParentId = masterList[0].Id;
cloneNote.OwnerId = n.OwnerId;
cloneNote.isPrivate = n.isPrivate;
nList.add(cloneNote);
}
return nList;
}

 

--------------------------------------

 

// Returns a dynamic SOQL statement for the whole object, includes only creatable fields since we will be inserting a cloned result of this query
public static string getCreatableFieldsSOQL(String objectName, String whereClause){

String selects = '';

if (whereClause == null || whereClause == ''){ return null; }

// Get a map of field name and field token
Map<String, Schema.SObjectField> fMap = Schema.getGlobalDescribe().get(objectName.toLowerCase()).getDescribe().Fields.getMap();
list<string> selectFields = new list<string>();

if (fMap != null){
for (Schema.SObjectField ft : fMap.values()){ // loop through all field tokens (ft)
Schema.DescribeFieldResult fd = ft.getDescribe(); // describe each field (fd)
if (fd.isCreateable()){ // field is creatable
selectFields.add(fd.getName());
}
}
}

if (!selectFields.isEmpty()){
for (string s:selectFields){
selects += s + ',';
}
if (selects.endsWith(',')){selects = selects.substring(0,selects.lastIndexOf(','));}

}

return 'SELECT ' + selects + ' FROM ' + objectName + ' WHERE ' + whereClause;

}

 

Any input on how to fix this issue is greatly appreciated.

 

We have reached our max for api calls (85k) two days in a row suddenly. We have never run into this before.

I have looked at the API calls made within the last 7 days report and it shows that one of my users (an api program I wrote) has suddenly spiked its calls from a typical of 3k a day to 50k a day. But I cant see why?  Also it doesnt show the date just the day of week so its hard to tell how real time it is (i.e. is Wednesday last Wednesday or today?).  The report also shows that some of my customer portal users are using api calls as well. I read that customer portal user logins do not count toward api calls.

I need help to identify what is causing this spike. How can I see live what api calls are coming in.  I am happy to bring down my app to see if the calls slow down but cant find anyway to see and investigate them in real time. 

This is causing serious inconvenience for my company. Please help me resolve. thanks.
-megan