Recalculate and SubmitCrmForm JavaScript function in CRM


Hi,

I was trying to figure out what the recalcuate button does in case of Order and Quote form. Got to know that it calculates the total based on the Products added to that record. Behind the scene this is the html code for the recalculate button

<li tabIndex=”-1″ title=”Recalculate” id=”_MBcrmFormSubmitCrmForm1truetruefalse”
onclick=”window.execScript(action)”
action=”crmForm.SubmitCrmForm(1, true, true, false);”>

So basically it calls SubmitCrmForm function.

SubmitCrmForm triggers the save event even if there are no modifications made on the form.

SubmitCRMForm( Mode, Validate, ForceSubmit, closeWindow)        // we could use this function but it is unsupported

Different Mode could be -1,2,7,58,59

or alternatively we could use the below function

Save
Code: 1
Function: crmForm.Save();

SaveAndClose
Code: 2
Function: crmForm.SaveAndClose();

Send
Code: 7
Function: send();

SaveAsCompleted
Code: 58
Function: SaveAsCompleted();

SaveAndNew
Code: 59
Function: crmForm.SubmitCrmForm(59, true, true, false);

Bye…

Finding the id of the element using IE Developer tool.


With IE Developer Tool, to find the id, we need to do the following

Select developer tools and

clip_image001

then “select element by click” in find menu of dev tool.

clip_image002

And then select the element whose id we want

clip_image003

The id would be within the Li element within the attributes tab, select it

clip_image004

 

That’s  it ..

This message has not yet been submitted for delivery (email activity status pending send)


Hi,

I was writing a custom code to send email using templates in CRM 4.0.

The code was working properly but the mails weren’t getting sent.

Checking at activities in CRM i found out the email activities have got created but were showing the status as “job pending”.

While searching for the same i found out that making modification to this file

C:\Program Files\Microsoft CRM Email\Service\Microsoft.Crm.Tools.EmailAgent.xml

would solve this problem.

Especially these tags !!

<MaxMessageCount>30</MaxMessageCount>

<PendingStatusDelay>30</PendingStatusDelay>
<SendingStatusDelay>60</SendingStatusDelay>

Check this link for detailed information

Email router configuration XML file explained

and this post as well

http://niths.wordpress.com/2008/08/27/this-message-has-not-yet-been-submitted-for-delivery/

http://msdn.microsoft.com/en-us/library/cc906237.aspx

http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?pg=2&p=1&tid=8e427cc6-f88a-4a56-b2c3-321418398718&dg=microsoft.public.crm

Bye

CRM Customization Import failed Error: Invalid name prefix


Hi,

While importing customization from development to staging server we were receiving the error.

It was giving the error on a particular relationship “opportunity_new_dataaudit”.

What we did was to comment the entire EntityRelationShip tag for that particular relationship along with it’s corresponding EntityMap entry in the customization.xml

i.e.

<EntityRelationship Name=”Opportunity_New_DataAudit“>
<EntityRelationshipType>OneToMany</EntityRelationshipType>
<ReferencingEntityName>New_DataAudit</ReferencingEntityName>
<ReferencedEntityName>Opportunity</ReferencedEntityName>
<CascadeAssign>NoCascade</CascadeAssign>
<CascadeDelete>RemoveLink</CascadeDelete>
<CascadeReparent>NoCascade</CascadeReparent>
<CascadeShare>NoCascade</CascadeShare>
<CascadeUnshare>NoCascade</CascadeUnshare>
<ReferencingAttributeName>new_opportunityid</ReferencingAttributeName>
<RelationshipDescription>
<Descriptions>
<Description description=”Unique identifier for Opportunity associated with Data Audit.” languagecode=”1033″ />
</Descriptions>
</RelationshipDescription>
<field name=”new_opportunityid” requiredlevel=”none” imemode=”auto” lookupstyle=”single” lookupbrowse=”0″>
<displaynames>
<displayname description=”Opportunity” languagecode=”1033″ />
</displaynames>
</field>
<EntityRelationshipRoles>
<EntityRelationshipRole>
<NavPaneDisplayOption>UseCollectionName</NavPaneDisplayOption>
<NavPaneArea>Details</NavPaneArea>
<NavPaneOrder>10000</NavPaneOrder>
</EntityRelationshipRole>
</EntityRelationshipRoles>
</EntityRelationship>

AND

<EntityMap>
<EntitySource>opportunity</EntitySource>
<EntityTarget>new_dataaudit</EntityTarget>
<AttributeMaps />
</EntityMap>
<EntityMap>

And than we tried importing it and it worked for us.

And there was another way we were able to resolve this error, quite interestingly when we changed the name of EntityRelationship from

Opportunity_New_DataAudit

to

new_Opportunity_New_DataAudit
<EntityRelationship Name=”new_Opportunity_New_DataAudit“>
<EntityRelationshipType>OneToMany</EntityRelationshipType>
<ReferencingEntityName>New_DataAudit</ReferencingEntityName>

i.e simply appending new_ to relationship name in the customization.xml it imported successfully !

Bye…

Passing Exam MB2-631 Microsoft Dynamics CRM 4.0 Customization and Configuration


Hi,

Last week I took this exam and passed with a score of 98. For preparation I used the following training material.

Course 8912: Customization and Configuration in Microsoft Dynamics CRM 4.0 and Working with Microsoft Dynamics CRM 4.0 (Microsoft Press).

I felt the course 8912 training material is more than enough for passing the exam.

(Chapter 11: Introduction to Advanced Customizations :- There weren’t any questions from this chapter it’s just there for our own understanding).

Bye….

Customization Import failed. Error: OrganizationUI With Id =…… Does Not Exist or Failure: new_…: The requested record was not found or you do not have sufficient permissions to view it.


I was getting this error when i was trying to import customization for one of our custom entity from our development server to test server.

The way i resolved was

1) Opened the customization.xml file i was trying to import.

2) Search for the organization id which was mentioned in the event log as one not existing. (OrganizationUI With Id = 42467170-73ec-4b39-8eca-309ab0daece9 Does Not Exist)

3) I found the id in the  <FormXml id=”{42467170-73ec-4b39-8eca-309ab0daece9}”> tag.

4) I exported the customization for the same entity from my test server.

5) In the customization file(test server) i found out it had different id for FormXml.

6) Replace the id value for FormXml in the development server’s customization with id i found at the test server for the same entity.

7) Than i tried importing this newly modified file and it imported without giving any error.

Bye…

%d bloggers like this: